ShowerProduedPtrsHolder.hh
Go to the documentation of this file.
1 //###################################################################
2 //### Name: ShowerProduedPtrsHolder ###
3 //### Author: Dominic Barker ###
4 //### Date: 15.07.19 ###
5 //### Description: Class to holder the unique ptrs required to ###
6 //### produce data products. Used in SBNShower_modle ###
7 //### and corresponding tools. ###
8 //###################################################################
9 
10 #ifndef ShowerProduedPtrsHolder_HH
11 #define ShowerProduedPtrsHolder_HH
12 
13 //Framework includes
17 
18 //C++ Includes
19 #include <iostream>
20 #include <map>
21 #include <string>
22 #include <memory>
23 #include <iomanip>
24 #include <cxxabi.h>
25 
26 namespace reco {
27  namespace shower {
28  class ShowerUniqueProduerPtrBase;
29  template <class T> class ShowerUniqueProductPtr;
30  template <class T> class ShowerUniqueAssnPtr;
31  class ShowerPtrMakerBase;
32  template <class T> class ShowerPtrMaker;
34  }
35 }
36 
37 //Template to check if its an assn
38 template <class N>
39 struct is_assn { static const int value = 0; };
40 
41 template <class L, class R, class D>
42 struct is_assn<art::Assns< L, R, D > >{ static const int value = 1; };
43 
44 //Template to carry the type becuase functions can't, annoyingly, be partially specialised
45 template <typename T>
46 struct type{};
47 
48 
49 //Base class for the class that holds the ptr.
51 
52 public:
53 
54  virtual ~ShowerUniqueProduerPtrBase() noexcept = default;
55 
56  virtual void reset() = 0;
57 
58  virtual void AddDataProduct(reco::shower::ShowerElementHolder& selement_holder, std::string Name) = 0;
59 
60  virtual void MoveToEvent(art::Event& evt) = 0;
61 
62  virtual std::string GetType() = 0;
63  virtual std::string GetInstanceName() = 0;
64 
65  virtual int GetVectorPtrSize(){return -1;}
66 };
67 
68 //Class that holds a unique ptr for the product. This is what is stored in the map. The product is put into
69 //the event as a vector so the this holder maintains this unique ptr and the actions to manipulate it.
70 template <class T>
72 
73 public:
74 
76  ptr = 1;
77  showeruniqueptr = std::make_unique<std::vector<T> >();
78  InstanceName = Instancename;
79  }
80 
81  //Get the unique ptr for the data product.
82  std::unique_ptr<T>& GetPtr(){
83  if(ptr){
84  return showeruniqueptr;
85  }
86  else{
87  throw cet::exception("ShowerUniqueProduerPtr") << "Element does not exist" << std::endl;
88  return showeruniqueptr;
89  }
90  }
91 
92  void reset() override {
93  showeruniqueptr.reset(new std::vector<T>());
94  }
95 
96  //Add a data product on to the vector that will be added to the event.
98  T product;
99  int err = selement_holder.GetElement(Name, product);
100  if(err){
101  mf::LogError("ShowerProduedPtrsHolder") << "Trying to add data product: " << Name << ". This element does not exist in the element holder" << std::endl;
102  return;
103  }
104  showeruniqueptr->push_back(product);
105  return;
106  }
107 
108  //Final thing to do move to the event.
109  void MoveToEvent(art::Event& evt) override {
110  evt.put(std::move(showeruniqueptr),InstanceName);
111  }
112 
113  //This returns the type of the undrlying element. It should be of the form std::unique_ptr<std::vector<T> >
114  std::string GetType() override {
115  int status = -9;
116  return abi::__cxa_demangle(typeid(showeruniqueptr.get()).name(),NULL,NULL,&status);
117  }
118 
119  //A user can set the instances name like an other producer module product. Get it using this.
121  return InstanceName;
122  }
123 
124  //Get the size of the std::vector. Usful for making assns.
125  int GetVectorPtrSize() override {
126  return showeruniqueptr->size();
127  }
128 
129 
130 private:
131 
132  //Element itself that is put into the art event.
133  std::unique_ptr<std::vector<T> > showeruniqueptr;
134 
135  //bool to see if the element is set.
136  bool ptr;
137 
138  //Name when saved into the the event default is ""
140 };
141 
142 
143 //Class that holds a unique ptr for the association. This is what is stored in the map. The association is put into
144 //the event as a vector so the this holder maintains this unique ptr and the actions to manipulate it.
145 //I guess if the product if a product is unique to the event then this holder will deal with it.
146 //I have tried to be smart and I don't think it not being an association is a problem as
147 //long as the user is smart.
148 template <class T>
150 
151 public:
152 
154  ptr = 1;
155  showeruniqueptr = std::make_unique<T>();
156  InstanceName = Instancename;
157  }
158 
159  //Get the ptr to the association.
160  std::unique_ptr<T>& GetPtr(){
161  if(ptr){
162  return showeruniqueptr;
163  }
164  else{
165  throw cet::exception("ShowerUniqueAssnPtr") << "Element does not exist" << std::endl;
166  return showeruniqueptr;
167  }
168  }
169 
170  void reset() override {
171  showeruniqueptr.reset(new T());
172  }
173 
174  //place the association to the event.
175  void MoveToEvent(art::Event& evt) override {
176  evt.put(std::move(showeruniqueptr), InstanceName);
177  }
178 
179  //Not need but the compiler complains if its not here.
181  throw cet::exception("ShowerUniqueAssnPtr") << "The creator of this code has failed you. Please contact Dominic Bakrer" << std::endl;
182  }
183 
184  //Get the type in form as a string. It should be the form of std::unique_ptr<art::Assn<T A, T1 B> >
185  std::string GetType() override {
186  int status = -9;
187  return abi::__cxa_demangle(typeid(showeruniqueptr.get()).name(),NULL,NULL,&status);
188  }
189 
190  //Get the Instance name that product will be saved as in the art::Event.
192  return InstanceName;
193  }
194 
195 
196 private:
197 
198  //Actual Element the assn. This is put into the event.
199  std::unique_ptr<T> showeruniqueptr;
200 
201  //bool to see if the element is filled.
202  bool ptr;
203 
204  //Name when saved into the the event default is ""
206 };
207 
208 
209 //Base class to hold the pointer makers. This interacts the with the module a little differently
210 //as the ptr makers do not work within the tools. The holds and the ptrmaker and provides set and
211 //get functions so that the usr can access art::Ptrs for the products of the module and associate
212 //them to other things.
214 
215 public:
216 
217  virtual ~ShowerPtrMakerBase() noexcept = default;
218 
219  virtual bool CheckPtrMaker() = 0;
220 
221  virtual void SetPtrMaker(art::Event& evt) = 0;
222 
223  virtual void Reset() = 0;
224 
225 };
226 
227 //Derived class - See above
228 template<class T>
230 
231 public:
232 
233 
235  ptrmaker = nullptr;
236  ptr = 0;
237  InstanceName = Instancename;
238  }
239 
240  //Check the ptr maker is ready to be used.
241  bool CheckPtrMaker() override {
242  if(ptr){
243  return true;
244  }
245  return false;
246  }
247 
248  //Return the ptr maker. Probably never needed.
250  if(ptr){
251  if(ptrmaker == NULL){
252  throw cet::exception("ShowerPtrMaker") << "Ptr maker ptr is null" << std::endl;
253  }
254  return *ptrmaker;
255  }
256  throw cet::exception("ShowerPtrMaker") << "Trying to get a ptrmaker that does not exists" << std::endl;
257  return *ptrmaker;
258  }
259 
260  //Return the art ptr that the module produces corresponding the index iter
262  if(ptr){
263  if(ptrmaker == NULL){
264  throw cet::exception("ShowerPtrMaker") << "Ptr maker ptr is null" << std::endl;
265  }
266  return (*ptrmaker)(iter);
267  }
268  throw cet::exception("ShowerPtrMaker") << "Trying to get a ptrmaker that does not exists" << std::endl;
269  return (*ptrmaker)(0);
270  }
271 
272  //Set the ptr maker this is reset at the start of the event.
273  void SetPtrMaker(art::Event& evt) override {
274  ptrmaker.reset(new art::PtrMaker<T>(evt,InstanceName));
275  ptr = 1;
276  }
277 
278  void Reset() override {
279  if(!ptr){
280  throw cet::exception("ShowerPtrMaker") << "Trying to reset ptr but it has not been set in the first place. Please contatc Dom Barker" << std::endl;
281  }
282  ptrmaker.reset(nullptr);
283  ptr = 0;
284  }
285 
286 private:
287 
288  //The ptr maker itself. Used to make art::Ptrs to make assns.
289  std::unique_ptr<art::PtrMaker<T> > ptrmaker;
290 
291  //The name of the data product which will be saved in the event. The ptr maker requires this.
293 
294  //bool to tell if the ptr maker is ready to use or not.
295  int ptr;
296 };
297 
298 //Class that holds all the unique ptrs and the ptr makers. It is what the tools and module use
299 //to access the above class elements. The end user case will see the user not interact with this
300 // directly.
302 
303 public:
304 
305  //Initialise the a unique ptr in the map. This will be added to the event.
306  template <class T>
308 
309  //Add to the assns
310  if(showerassnPtrs.find(Name) != showerassnPtrs.end()){
311  mf::LogWarning("ShowerProduedPtrsHolder") << "Trying to set Element: " << Name << ". This element has already been set. Please check." << std::endl;
312  return 1;
313  }
314 
315  //Check the same type has not already been set.
316  if(!CheckForMultipleTypes(type<T>(), Name, Instance)){
317  throw cet::exception("ShowerProduedPtrsHolder") << "Trying to set multiple objects with same type with no instance name or same instance name" << std::endl;
318  return 1;
319  }
320 
321  showerassnPtrs[Name] = std::unique_ptr<reco::shower::ShowerUniqueAssnPtr<T> >(new reco::shower::ShowerUniqueAssnPtr<T>(Instance));
322  return 0;
323  }
324 
325  //Set the unique ptr. The unique ptr will be filled into the event.
326  template <class T>
327  int SetShowerUniqueProduerPtr(type<std::vector<T> >, std::string Name, std::string Instance=""){
328 
329  //Then add the products
330  if(showerproductPtrs.find(Name) != showerproductPtrs.end()){
331  mf::LogWarning("ShowerProduedPtrsHolder") << "Trying to set Element: " << Name << ". This element has already been set. Please check." << std::endl;
332  return 1;
333  }
334 
335  //Check the same type has not already been set.
336  if(!CheckForMultipleTypes(type<std::vector<T> >(), Name, Instance)){
337  throw cet::exception("ShowerProduedPtrsHolder") << "Trying to set multiple objects with same type with no instance name or same instance name" << std::endl;
338  return 1;
339  }
340 
341  if(showerPtrMakers.find(Name) != showerPtrMakers.end()){
342  throw cet::exception("ShowerProduedPtrsHolder") << "PtrMaker already exist. It should not be set again" << std::endl;
343  return 1;
344  }
345  showerPtrMakers[Name] = std::unique_ptr<reco::shower::ShowerPtrMaker<T> >(new reco::shower::ShowerPtrMaker<T>(Instance));
346  showerproductPtrs[Name] = std::unique_ptr<reco::shower::ShowerUniqueProductPtr<std::vector<T > > >(new reco::shower::ShowerUniqueProductPtr<std::vector<T> >(Instance));
347  return 0;
348  }
349 
350 
351  //Checks if the ptr exists
353  if(showerproductPtrs.find(Name) != showerproductPtrs.end()){
354  return true;
355  }
356  if(showerassnPtrs.find(Name) != showerassnPtrs.end()){
357  return true;
358  }
359  return false;
360  }
361 
362  //Reset the ptrs;
363  void reset(){
364  for(auto const& showerptr: showerproductPtrs){
365  (showerptr.second)->reset();
366  }
367  for(auto const& showerptr: showerassnPtrs){
368  (showerptr.second)->reset();
369  }
370  }
371 
372  //Add any data products that are produced by the module to the unique ptr it corresponds to
373  //This is done by matching strings in the element holder and the ptr holder. Hence these
374  //must match. This is a global command done in the module.
376  for(auto const& showerproductPtr: showerproductPtrs){
377  (showerproductPtr.second)->AddDataProduct(selement_holder, showerproductPtr.first);
378  }
379  }
380 
381  //Global command to move all products into the event. This is done in the module.
383  for(auto const& showerproductPtr: showerproductPtrs){
384  (showerproductPtr.second)->MoveToEvent(evt);
385  }
386  for(auto const& showerassnPtr: showerassnPtrs){
387  (showerassnPtr.second)->MoveToEvent(evt);
388  }
389  }
390 
392  bool checked = true;
393  for(auto const& showerproductPtr: showerproductPtrs){
394  if(showerproductPtr.first == "shower"){continue;}
395  checked *= selement_holder.CheckElement(showerproductPtr.first);
396  }
397  return checked;
398  }
399 
400 
401  //This returns the unique ptr. This is a legacy code.
402  template <class T>
404  if(showerproductPtrs.find(Name) != showerproductPtrs.end()){
405  reco::shower::ShowerUniqueProductPtr<T>* prod = dynamic_cast<reco::shower::ShowerUniqueProductPtr<T> *>(showerproductPtrs[Name].get());
406  return prod->GetPtr();
407  }
408  else if(showerassnPtrs.find(Name) != showerassnPtrs.end()){
409  reco::shower::ShowerUniqueAssnPtr<T>* assn = dynamic_cast<reco::shower::ShowerUniqueAssnPtr<T> *>(showerassnPtrs[Name].get());
410  return assn->GetPtr();
411  }
412  else{
413  throw cet::exception("ShowerProduedPtrsHolder") << "Trying to get Ptr for: " << Name << " but Element does not exist" << std::endl;
414  return T();
415  }
416  }
417 
418  //Wrapper so that the use the addSingle command for the association. Add A and B to the association just
419  //as if add single add.
420  template <class T, class A, class B>
422  if(showerassnPtrs.find(Name) == showerassnPtrs.end()){
423  throw cet::exception("ShowerProduedPtrsHolder") << "Trying to get the association: " << Name << "Element does not exist" << std::endl;
424  return;
425  }
426  if(!is_assn<T>::value){
427  throw cet::exception("ShowerProduedPtrsHolder") << "Element type is not an assoication please only use this for assocations" << std::endl;
428  return;
429  }
430  reco::shower::ShowerUniqueAssnPtr<T>* assnptr = dynamic_cast<reco::shower::ShowerUniqueAssnPtr<T> *>(showerassnPtrs[Name].get());
431  if(assnptr == NULL){
432  throw cet::exception("ShowerProduedPtrsHolder") << "Failed to cast back. Maybe you got the type wrong or you are accidently accessing a differently named product" << std::endl;
433  }
434 
435  T* assn = dynamic_cast<T*>(assnptr->GetPtr().get());
436  if(assn == NULL){
437  throw cet::exception("ShowerProduedPtrsHolder") << "Something went wrong trying to cast tothe assn. Maybe the name: " << Name << " exists but its not an assn" << std::endl;
438  }
439 
440  assn->addSingle(a,b);
441  return;
442  }
443 
444  //Initialise the ptr makers. This is done at the the start of the module.
446  for(auto const& showerPtrMaker: showerPtrMakers){
447  if(showerPtrMakers.find(showerPtrMaker.first) == showerPtrMakers.end()){
448  throw cet::exception("ShowerProduedPtrsHolder") << "PtrMaker was empty. This is concerning" << std::endl;
449  }
450  showerPtrMakers[showerPtrMaker.first]->SetPtrMaker(evt);
451  }
452  }
453 
454  //Wrapper to access a particle PtrMaker. This is legacy as is not used.
455  template <class T>
457  if(showerPtrMakers.find(Name) == showerPtrMakers.end()){
458  throw cet::exception("ShowerProduedPtrsHolder") << "PtrMaker does not exist" << std::endl;
459  }
460  else{
461  if(!showerPtrMakers[Name]->CheckPtrMaker()){
462  throw cet::exception("ShowerProduedPtrsHolder") << "PtrMaker is not set" << std::endl;
463  }
464  reco::shower::ShowerPtrMaker<T>* ptrmaker = dynamic_cast<reco::shower::ShowerPtrMaker<T> *>(showerassnPtrs[Name].get());
465  return ptrmaker->GetPtrMaker();
466  }
467  }
468 
469  //Wrapper to return to the the user the art ptr corresponding the index iter
470  template <class T>
472  if(showerPtrMakers.find(Name) == showerPtrMakers.end()){
473  throw cet::exception("ShowerProduedPtrsHolder") << "PtrMaker does not exist for " << Name << " Did you initialise this? " << std::endl;
474  }
475  else{
476  if(!showerPtrMakers[Name]->CheckPtrMaker()){
477  throw cet::exception("ShowerProduedPtrsHolder") << "PtrMaker is not set. This is an issue for the devlopment team me. Contact Dom Barker" << std::endl;
478  }
479  reco::shower::ShowerPtrMaker<T>* ptrmaker = dynamic_cast<reco::shower::ShowerPtrMaker<T> *>(showerPtrMakers[Name].get());
480  if(ptrmaker == NULL){
481  throw cet::exception("ShowerProduedPtrsHolder") << "Failed to cast back. Maybe you got the type wrong or you are accidently accessing a differently named product" << std::endl;
482  }
483  return ptrmaker->GetArtPtr(iter);
484  }
485  }
486 
487  //Legacy not used.
489  for(auto const& showerPtrMaker: showerPtrMakers){
490  (showerPtrMaker.second)->Reset();
491  }
492  }
493 
494  //Return the size of the std::vector of the data object with the unique name string.
496  if(showerproductPtrs.find(Name) != showerproductPtrs.end()){
497  return showerproductPtrs[Name]->GetVectorPtrSize();
498  }
499  throw cet::exception("ShowerProduedPtrsHolder") << "Product: " << Name << " has not been set in the producers map" << std::endl;
500  }
501 
502  //Print the type, the element name and the instance name
504  if(showerproductPtrs.find(Name) != showerproductPtrs.end()){
505  std::string Type = showerproductPtrs[Name]->GetType();
506  std::string InstanceName = showerproductPtrs[Name]->GetInstanceName();
507  std::cout << "Element Name: " << Name << " Instance Name: " << InstanceName << " Type: " << Type << std::endl;
508  return;
509  }
510  if(showerassnPtrs.find(Name) != showerassnPtrs.end()){
511  std::string Type = showerassnPtrs[Name]->GetType();
512  std::string InstanceName = showerassnPtrs[Name]->GetInstanceName();
513  std::cout << "Element Name: " << Name << " Instance Name: " << InstanceName << " Type: " << Type << std::endl;
514  return;
515  }
516  mf::LogError("ShowerProduedPtrsHolder") << "Trying to print Element: " << Name << ". This element does not exist in the element holder" << std::endl;
517  return;
518  }
519 
520 
521  //This function will print out all the pointers and there types for the user to check.
522  void PrintPtrs(){
523 
524  unsigned int maxname = 0;
525  for(auto const& showerprodPtr: showerproductPtrs){
526  if(showerprodPtr.first.size() > maxname){
527  maxname = showerprodPtr.first.size();
528  }
529  }
530  for(auto const& showerassnPtr: showerassnPtrs){
531  if(showerassnPtr.first.size() > maxname){
532  maxname = showerassnPtr.first.size();
533  }
534  }
535 
536  std::map<std::string,std::pair<std::string,std::string> > Type_showerprodPtrs;
537  std::map<std::string,std::pair<std::string,std::string> > Type_showerassnPtrs;
538  for(auto const& showerprodPtr: showerproductPtrs){
539  std::string Type = (showerprodPtr.second)->GetType();
540  std::string InstanceName = (showerprodPtr.second)->GetInstanceName();
541  Type_showerprodPtrs[showerprodPtr.first] = std::make_pair(InstanceName,Type);
542  }
543  for(auto const& showerassnPtr: showerassnPtrs){
544  std::string Type = (showerassnPtr.second)->GetType();
545  std::string InstanceName = (showerassnPtr.second)->GetInstanceName();
546  Type_showerassnPtrs[showerassnPtr.first] = std::make_pair(InstanceName,Type);
547  }
548 
549  unsigned int maxtype = 0;
550  unsigned int maxinstname = 0;
551  for(auto const& Type_showerprodPtr: Type_showerprodPtrs){
552  if(Type_showerprodPtr.second.second.size() > maxtype){
553  maxtype = Type_showerprodPtr.second.second.size();
554  }
555  if(Type_showerprodPtr.second.first.size() > maxinstname){
556  maxinstname = Type_showerprodPtr.second.first.size();
557  }
558  }
559  for(auto const& Type_showerassnPtr: Type_showerassnPtrs){
560  if(Type_showerassnPtr.second.second.size() > maxtype){
561  maxtype = Type_showerassnPtr.second.second.size();
562  }
563  if(Type_showerassnPtr.second.first.size() > maxinstname){
564  maxinstname = Type_showerassnPtr.second.first.size();
565  }
566  }
567 
568  unsigned int n = maxname + maxtype + maxinstname + 51;
569  std::cout << std::left << std::setfill('*') << std::setw(n-1) << "**" <<std::endl;
570  std::cout << "Unique Ptrs that are added to the event" << std::endl;
571  std::cout << std::left << std::setfill('*') << std::setw(n-1) << "**" <<std::endl;
572  for(auto const& Type_showerprodPtr: Type_showerprodPtrs){
573  std::cout << std::left << std::setfill(' ') << std::setw(21) << "* Data Product Name: " << std::setw(maxname) << Type_showerprodPtr.first;
574  std::cout << std::left << std::setfill(' ') << " * Instance Name: " << std::setw(maxinstname) << Type_showerprodPtr.second.first;
575  std::cout << std::left << std::setfill(' ') << " * Type: " << std::setw(maxtype) << Type_showerprodPtr.second.second << " *" << std::endl;
576  }
577  for(auto const& Type_showerassnPtr: Type_showerassnPtrs){
578  std::cout << std::left << std::setfill(' ') << std::setw(maxname) << std::setw(21) << "* Association Name: " << std::setw(maxname) << Type_showerassnPtr.first;
579  std::cout << std::left << std::setfill(' ') << " * Instance Name: " << std::setw(maxinstname) << Type_showerassnPtr.second.first;
580  std::cout << std::left << std::setfill(' ') << " * Type: " << std::setw(maxtype) << Type_showerassnPtr.second.second<< " *" << std::endl;
581  }
582  std::cout << std::left << std::setfill('*') << std::setw(n-1) << "**" <<std::endl;
583  std::cout << std::setfill(' ');
584  std::cout << std::setw(0);
585  return;
586  }
587 
588 
589 
590 private:
591 
592  //Function to check that a data product does not already exist with the same instance name
593  template <class T>
595 
596  //Check the a product of the same does not exist without a different instance name
597  for(auto const& assn: showerassnPtrs){
598  reco::shower::ShowerUniqueAssnPtr<T>* assnptr = dynamic_cast<reco::shower::ShowerUniqueAssnPtr<T> *>(assn.second.get());
599  if(assnptr != NULL){
600  if(assnptr->GetInstanceName() == Instance){return false;}
601  }
602  }
603  return true;
604  }
605 
606  //Function to check that a data product does not already exist with the same instance name
607  template <class T>
608  bool CheckForMultipleTypes(type<std::vector<T> >, std::string Name, std::string Instance){
609 
610  //Check the a product of the same does not exist without a different instance name
611  for(auto const& product: showerproductPtrs){
613  if(prod != NULL){
614  if(prod->GetInstanceName() == Instance){return false;}
615  }
616  }
617  return true;
618  }
619 
620 
621 
622  //Holder of the data objects of type std::vector<T> that will be saved in the events.
623  std::map<std::string,std::unique_ptr<reco::shower::ShowerUniqueProduerPtrBase > > showerproductPtrs;
624 
625  //Holder of the data objects of type T that will be saved into the events. I think these will only be assns.
626  std::map<std::string,std::unique_ptr<reco::shower::ShowerUniqueProduerPtrBase > > showerassnPtrs;
627 
628  //Holder of the ptrMakers whcih make the art::Ptrs of the data objects that lie in showerproductPtrs.
629  std::map<std::string,std::unique_ptr<reco::shower::ShowerPtrMakerBase> > showerPtrMakers;
630 };
631 
632 
633 
634 #endif
static QCString name
Definition: declinfo.cpp:673
std::map< std::string, std::unique_ptr< reco::shower::ShowerPtrMakerBase > > showerPtrMakers
void AddDataProduct(reco::shower::ShowerElementHolder &selement_holder, std::string Name) override
std::string string
Definition: nybbler.cc:12
art::Ptr< T > GetArtPtr(std::string Name, int iter)
std::unique_ptr< art::PtrMaker< T > > ptrmaker
STL namespace.
void SetPtrMaker(art::Event &evt) override
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
void MoveToEvent(art::Event &evt) override
QTextStream & reset(QTextStream &s)
bool CheckAllProducedElements(reco::shower::ShowerElementHolder &selement_holder)
art::PtrMaker< T > & GetPtrMaker(std::string Name)
std::void_t< T > n
def move(depos, offset)
Definition: depos.py:107
int SetShowerUniqueProduerPtr(type< std::vector< T > >, std::string Name, std::string Instance="")
void AddSingle(A &a, B &b, std::string Name)
bool CheckForMultipleTypes(type< T >, std::string Name, std::string Instance)
void err(const char *fmt,...)
Definition: message.cpp:226
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
std::map< std::string, std::unique_ptr< reco::shower::ShowerUniqueProduerPtrBase > > showerproductPtrs
AdcCodeMitigator::Name Name
void AddDataProduct(reco::shower::ShowerElementHolder &selement_holder, std::string Name) override
int SetShowerUniqueProduerPtr(type< T >, std::string Name, std::string Instance="")
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225
int GetElement(std::string Name, T &Element)
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
bool CheckForMultipleTypes(type< std::vector< T > >, std::string Name, std::string Instance)
ShowerPtrMaker(std::string Instancename)
static bool * b
Definition: config.cpp:1043
std::map< std::string, std::unique_ptr< reco::shower::ShowerUniqueProduerPtrBase > > showerassnPtrs
TCEvent evt
Definition: DataStructs.cxx:7
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:730
Type
Type of JSON value.
Definition: rapidjson.h:618
void AddDataProducts(reco::shower::ShowerElementHolder &selement_holder)
Q_EXPORT QTSManip setfill(int f)
Definition: qtextstream.h:337
Definition: fwd.h:29
ShowerUniqueAssnPtr(std::string &Instancename)
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)