All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
reco::shower::ShowerElementHolder Class Reference

#include <ShowerElementHolder.hh>

Public Member Functions

template<class T >
int GetElement (const std::string &Name, T &Element) const
 
template<class T >
int GetEventElement (const std::string &Name, T &Element) const
 
template<class T >
const T & GetEventElement (std::string const &Name)
 
template<class T >
GetElement (const std::string &Name) const
 
template<class T , class T2 >
int GetElementAndError (const std::string &Name, T &Element, T2 &ElementErr) const
 
template<class T >
void SetElement (T &dataproduct, const std::string &Name, bool checktag=false)
 
template<class T , class T2 >
void SetElement (T &propertyval, T2 &propertyvalerror, const std::string &Name)
 
template<class T >
void SetEventElement (T &dataproduct, const std::string &Name)
 
bool CheckEventElement (const std::string &Name) const
 
bool CheckElement (const std::string &Name) const
 
bool CheckAllElements () const
 
void ClearElement (const std::string &Name)
 
void ClearShower ()
 
void ClearEvent ()
 
void ClearAll ()
 
bool CheckElementTag (const std::string &Name) const
 
void DeleteElement (const std::string &Name)
 
void SetElementTag (const std::string &Name, bool checkelement)
 
bool CheckAllElementTags () const
 
void SetShowerNumber (int &shower_iter)
 
int GetShowerNumber () const
 
void PrintElements () const
 
template<class T >
std::string getType (T object) const
 
template<class T >
std::string getType () const
 
template<class T1 , class T2 >
const art::FindManyP< T1 > & GetFindManyP (const art::ValidHandle< std::vector< T2 > > &handle, const art::Event &evt, const art::InputTag &moduleTag)
 
template<class T1 , class T2 >
const art::FindOneP< T1 > & GetFindOneP (const art::ValidHandle< std::vector< T2 > > &handle, const art::Event &evt, const art::InputTag &moduleTag)
 

Private Attributes

std::map< std::string,
std::unique_ptr
< reco::shower::ShowerElementBase > > 
showerproperties
 
std::map< std::string,
std::unique_ptr
< reco::shower::ShowerElementBase > > 
showerdataproducts
 
std::map< std::string,
std::unique_ptr
< reco::shower::ShowerElementBase > > 
eventdataproducts
 
int showernumber
 

Detailed Description

Definition at line 215 of file ShowerElementHolder.hh.

Member Function Documentation

bool reco::shower::ShowerElementHolder::CheckAllElements ( ) const
inline

Definition at line 434 of file ShowerElementHolder.hh.

434  {
435  bool checked = true;
436  for(auto const& showerprop: showerproperties){
437  checked *= showerprop.second->CheckShowerElement();
438  }
439  for(auto const& showerdataprod: showerdataproducts){
440  checked *= showerdataprod.second->CheckShowerElement();
441  }
442  return checked;
443  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
bool reco::shower::ShowerElementHolder::CheckAllElementTags ( ) const
inline

Definition at line 514 of file ShowerElementHolder.hh.

514  {
515  bool checked = true;
516  for(auto const& showerdataproduct: showerdataproducts){
517  bool check = showerdataproduct.second->CheckTag();
518  if(check){
519  bool elementset = showerdataproduct.second->CheckShowerElement();
520  if(!elementset){
521  mf::LogError("ShowerElementHolder") << "The following element is not set and was asked to be checked: " << showerdataproduct.first << std::endl;
522  checked = false;
523  }
524  }
525  }
526  return checked;
527  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
process_name tightIsolTest check
bool reco::shower::ShowerElementHolder::CheckElement ( const std::string &  Name) const
inline

Definition at line 417 of file ShowerElementHolder.hh.

417  {
418  auto const showerPropertiesIt = showerproperties.find(Name);
419  if(showerPropertiesIt != showerproperties.end()){
420  return showerPropertiesIt->second->CheckShowerElement();
421  }
422  auto const showerDataProductsIt = showerdataproducts.find(Name);
423  if(showerDataProductsIt != showerdataproducts.end()){
424  return showerDataProductsIt->second->CheckShowerElement();
425  }
426  auto const eventDataProductsIt = eventdataproducts.find(Name);
427  if(eventDataProductsIt!= eventdataproducts.end()){
428  return eventDataProductsIt->second->CheckShowerElement();
429  }
430  return false;
431  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
BEGIN_PROLOG vertical distance to the surface Name
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > eventdataproducts
bool reco::shower::ShowerElementHolder::CheckElementTag ( const std::string &  Name) const
inline

Definition at line 482 of file ShowerElementHolder.hh.

482  {
483  auto const showerDataProductsIt = showerdataproducts.find(Name);
484  if(showerDataProductsIt != showerdataproducts.end()){
485  return showerDataProductsIt->second->CheckTag();
486  }
487  return false;
488  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
BEGIN_PROLOG vertical distance to the surface Name
bool reco::shower::ShowerElementHolder::CheckEventElement ( const std::string &  Name) const
inline

Definition at line 411 of file ShowerElementHolder.hh.

411  {
412  auto const eventDataProductsIt = eventdataproducts.find(Name);
413  return eventDataProductsIt == eventdataproducts.end() ? false : eventDataProductsIt->second->CheckShowerElement();
414  }
BEGIN_PROLOG vertical distance to the surface Name
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > eventdataproducts
void reco::shower::ShowerElementHolder::ClearAll ( )
inline

Definition at line 476 of file ShowerElementHolder.hh.

void reco::shower::ShowerElementHolder::ClearElement ( const std::string &  Name)
inline

Definition at line 447 of file ShowerElementHolder.hh.

447  {
448  auto const showerPropertiesIt = showerproperties.find(Name);
449  if(showerPropertiesIt != showerproperties.end()){
450  return showerPropertiesIt->second->Clear();
451  }
452  auto const showerDataProductsIt = showerdataproducts.find(Name);
453  if(showerDataProductsIt != showerdataproducts.end()){
454  return showerDataProductsIt->second->Clear();
455  }
456  mf::LogError("ShowerElementHolder") << "Trying to clear Element: " << Name << ". This element does not exist in the element holder" << std::endl;
457  return;
458  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
BEGIN_PROLOG vertical distance to the surface Name
void reco::shower::ShowerElementHolder::ClearEvent ( )
inline

Definition at line 470 of file ShowerElementHolder.hh.

470  {
471  for(auto const& eventdataproduct: eventdataproducts){
472  (eventdataproduct.second)->Clear();
473  }
474  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > eventdataproducts
void reco::shower::ShowerElementHolder::ClearShower ( )
inline

Definition at line 461 of file ShowerElementHolder.hh.

461  {
462  for(auto const& showerprop: showerproperties){
463  (showerprop.second)->Clear();
464  }
465  for(auto const& showerdataproduct: showerdataproducts){
466  (showerdataproduct.second)->Clear();
467  }
468  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
void reco::shower::ShowerElementHolder::DeleteElement ( const std::string &  Name)
inline

Definition at line 491 of file ShowerElementHolder.hh.

491  {
492  auto const showerPropertiesIt = showerproperties.find(Name);
493  if(showerPropertiesIt != showerproperties.end()){
494  return showerPropertiesIt->second.reset(nullptr);
495  }
496  auto const showerDataProductsIt = showerdataproducts.find(Name);
497  if(showerDataProductsIt != showerdataproducts.end()){
498  return showerDataProductsIt->second.reset(nullptr);
499  }
500  mf::LogError("ShowerElementHolder") << "Trying to delete Element: " << Name << ". This element does not exist in the element holder" << std::endl;
501  return;
502  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
BEGIN_PROLOG vertical distance to the surface Name
template<class T >
int reco::shower::ShowerElementHolder::GetElement ( const std::string &  Name,
T &  Element 
) const
inline

Definition at line 221 of file ShowerElementHolder.hh.

221  {
222  auto const showerPropertiesIt = showerproperties.find(Name);
223  if(showerPropertiesIt != showerproperties.end()){
224  if(showerPropertiesIt->second->CheckShowerElement()){
225  reco::shower::ShowerElementAccessor<T> *showerprop = dynamic_cast<reco::shower::ShowerElementAccessor<T> *>(showerPropertiesIt->second.get());
226  if(showerprop == nullptr){
227  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element you are filling is not the correct type" << std::endl;
228  }
229  showerprop->GetShowerElement(Element);
230  return 0;
231  }
232  else{
233  mf::LogWarning("ShowerElementHolder") << "Trying to get Element " << Name << ". This elment has not been filled" << std::endl;
234  return 1;
235  }
236  }
237 
238  auto const showerDataProductsIt = showerdataproducts.find(Name);
239  if(showerDataProductsIt != showerdataproducts.end()){
240  if(showerDataProductsIt->second->CheckShowerElement()){
241  reco::shower::ShowerElementAccessor<T> *showerprop = dynamic_cast<reco::shower::ShowerElementAccessor<T> *>(showerDataProductsIt->second.get());
242  if(showerprop == nullptr){
243  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element you are filling is not the correct type" << std::endl;
244  }
245  showerprop->GetShowerElement(Element);
246  return 0;
247  }
248  else{
249  mf::LogWarning("ShowerElementHolder") << "Trying to get Element " << Name << ". This elment has not been filled" << std::endl;
250  return 1;
251  }
252  }
253 
254  auto const eventDataProductsIt = eventdataproducts.find(Name);
255  if (eventDataProductsIt != eventdataproducts.end()){
256  if(eventDataProductsIt->second->CheckShowerElement()){
257  reco::shower::ShowerElementAccessor<T> *eventprop = dynamic_cast<reco::shower::ShowerElementAccessor<T> *>(eventDataProductsIt->second.get());
258  if(eventprop == nullptr){
259  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element you are filling is not the correct type" << std::endl;
260  }
261  eventprop->GetShowerElement(Element);
262  return 0;
263  }else{
264  mf::LogWarning("ShowerElementHolder") << "Trying to get Element " << Name << ". This elment has not been filled" << std::endl;
265  return 1;
266  }
267  }
268  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element does not exist in the element holder" << std::endl;
269  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
BEGIN_PROLOG vertical distance to the surface Name
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > eventdataproducts
template<class T >
T reco::shower::ShowerElementHolder::GetElement ( const std::string &  Name) const
inline

Definition at line 308 of file ShowerElementHolder.hh.

308  {
309  auto const showerPropertiesIt = showerproperties.find(Name);
310  if(showerPropertiesIt != showerproperties.end()){
311  if(showerPropertiesIt->second->CheckShowerElement()){
312  reco::shower::ShowerElementAccessor<T> *showerprop = dynamic_cast<reco::shower::ShowerElementAccessor<T> *>(showerPropertiesIt->second.get());
313  if(showerprop == nullptr){
314  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element you are filling is not the correct type" << std::endl;
315  }
316  return showerprop->GetShowerElement();
317  }
318  }
319 
320  auto const showerDataProductsIt = showerdataproducts.find(Name);
321  if(showerDataProductsIt != showerdataproducts.end()){
322  if(showerDataProductsIt->second->CheckShowerElement()){
323  reco::shower::ShowerElementAccessor<T> *showerprop = dynamic_cast<reco::shower::ShowerElementAccessor<T> *>(showerDataProductsIt->second.get());
324  if(showerprop == nullptr){
325  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element you are filling is not the correct type" << std::endl;
326  }
327  return showerprop->GetShowerElement();
328  }
329  }
330 
331  auto const eventDataProductsIt = eventdataproducts.find(Name);
332  if (eventDataProductsIt != eventdataproducts.end()){
333  if(eventDataProductsIt->second->CheckShowerElement()){
334  reco::shower::ShowerElementAccessor<T> *eventprop = dynamic_cast<reco::shower::ShowerElementAccessor<T> *>(eventDataProductsIt->second.get());
335  if(eventprop == nullptr){
336  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element you are filling is not the correct type" << std::endl;
337  }
338  return eventprop->GetShowerElement();
339  }
340  }
341  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element does not exist in the element holder" << std::endl;
342  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
BEGIN_PROLOG vertical distance to the surface Name
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > eventdataproducts
template<class T , class T2 >
int reco::shower::ShowerElementHolder::GetElementAndError ( const std::string &  Name,
T &  Element,
T2 &  ElementErr 
) const
inline

Definition at line 346 of file ShowerElementHolder.hh.

346  {
347  auto const showerPropertiesIt = showerproperties.find(Name);
348  if(showerPropertiesIt == showerproperties.end()){
349  mf::LogError("ShowerElementHolder") << "Trying to get Element Error: " << Name << ". This elment does not exist in the element holder" << std::endl;
350  return 1;
351  }
352  reco::shower::ShowerProperty<T,T2> *showerprop = dynamic_cast<reco::shower::ShowerProperty<T,T2> *>(showerPropertiesIt->second.get());
353  showerprop->GetShowerElement(Element);
354  showerprop->GetShowerPropertyError(ElementErr);
355  return 0;
356  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
BEGIN_PROLOG vertical distance to the surface Name
int GetShowerPropertyError(T2 &ElementErr) const
template<class T >
int reco::shower::ShowerElementHolder::GetEventElement ( const std::string &  Name,
T &  Element 
) const
inline

Definition at line 272 of file ShowerElementHolder.hh.

272  {
273  auto const eventDataProductsIt = eventdataproducts.find(Name);
274  if (eventDataProductsIt != eventdataproducts.end()){
275  if(eventDataProductsIt->second->CheckShowerElement()){
276  reco::shower::ShowerElementAccessor<T> *eventprop = dynamic_cast<reco::shower::ShowerElementAccessor<T> *>(eventDataProductsIt->second.get());
277  if(eventprop == nullptr){
278  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element you are filling is not the correct type" << std::endl;
279  }
280  eventprop->GetShowerElement(Element);
281  return 0;
282  }else{
283  mf::LogWarning("ShowerElementHolder") << "Trying to get Element " << Name << ". This elment has not been filled" << std::endl;
284  return 1;
285  }
286  }
287  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element does not exist in the element holder" << std::endl;
288  }
BEGIN_PROLOG vertical distance to the surface Name
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > eventdataproducts
template<class T >
const T& reco::shower::ShowerElementHolder::GetEventElement ( std::string const &  Name)
inline

Definition at line 292 of file ShowerElementHolder.hh.

292  {
293  auto const eventDataProductsIt = eventdataproducts.find(Name);
294  if (eventDataProductsIt != eventdataproducts.end()){
295  if(eventDataProductsIt->second->CheckShowerElement()){
296  reco::shower::ShowerElementAccessor<T> *eventprop = dynamic_cast<reco::shower::ShowerElementAccessor<T> *>(eventDataProductsIt->second.get());
297  if(eventprop == nullptr){
298  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element you are filling is not the correct type" << std::endl;
299  }
300  return eventprop->GetShowerElementRef();
301  }
302  }
303  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element does not exist in the element holder" << std::endl;
304  }
BEGIN_PROLOG vertical distance to the surface Name
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > eventdataproducts
template<class T1 , class T2 >
const art::FindManyP<T1>& reco::shower::ShowerElementHolder::GetFindManyP ( const art::ValidHandle< std::vector< T2 > > &  handle,
const art::Event &  evt,
const art::InputTag &  moduleTag 
)
inline

Definition at line 606 of file ShowerElementHolder.hh.

607  {
608 
609  const std::string name("FMP_" + moduleTag.label() + "_" + getType<T1>() + "_" + getType<T2>());
610 
611  if (CheckEventElement(name)){
612  return GetEventElement<art::FindManyP<T1> >(name);
613  } else {
614  art::FindManyP<T1> findManyP(handle, evt, moduleTag);
615  if (findManyP.isValid()){
616  SetEventElement(findManyP, name);
617  return GetEventElement<art::FindManyP<T1> >(name);
618  } else {
619  throw cet::exception("ShowerElementHolder") << "FindManyP is not valid: " << name << std::endl;
620  }
621  }
622  }
void SetEventElement(T &dataproduct, const std::string &Name)
bool CheckEventElement(const std::string &Name) const
then echo fcl name
TCEvent evt
Definition: DataStructs.cxx:8
template<class T1 , class T2 >
const art::FindOneP<T1>& reco::shower::ShowerElementHolder::GetFindOneP ( const art::ValidHandle< std::vector< T2 > > &  handle,
const art::Event &  evt,
const art::InputTag &  moduleTag 
)
inline

Definition at line 625 of file ShowerElementHolder.hh.

626  {
627 
628  const std::string name("FOP_" + moduleTag.label() + "_" + getType<T1>() + "_" + getType<T2>());
629 
630  if (CheckEventElement(name)){
631  return GetEventElement<art::FindOneP<T1> >(name);
632  } else {
633  art::FindOneP<T1> findOneP(handle, evt, moduleTag);
634  if (findOneP.isValid()){
635  SetEventElement(findOneP, name);
636  return GetEventElement<art::FindOneP<T1> >(name);
637  } else {
638  throw cet::exception("ShowerElementHolder") << "FindOneP is not valid: " << name << std::endl;
639  }
640  }
641  }
void SetEventElement(T &dataproduct, const std::string &Name)
bool CheckEventElement(const std::string &Name) const
then echo fcl name
TCEvent evt
Definition: DataStructs.cxx:8
int reco::shower::ShowerElementHolder::GetShowerNumber ( ) const
inline

Definition at line 535 of file ShowerElementHolder.hh.

535  {
536  return showernumber;
537  }
template<class T >
std::string reco::shower::ShowerElementHolder::getType ( object) const
inline

Definition at line 596 of file ShowerElementHolder.hh.

596  {
597  return cet::demangle_symbol(typeid(object).name());
598  }
then echo fcl name
template<class T >
std::string reco::shower::ShowerElementHolder::getType ( ) const
inline

Definition at line 601 of file ShowerElementHolder.hh.

601  {
602  return cet::demangle_symbol(typeid(T).name());
603  }
then echo fcl name
void reco::shower::ShowerElementHolder::PrintElements ( ) const
inline

Definition at line 540 of file ShowerElementHolder.hh.

540  {
541 
542  unsigned int maxname = 0;
543  for(auto const& showerprop: showerproperties){
544  if(showerprop.first.size() > maxname){
545  maxname = showerprop.first.size();
546  }
547  }
548  for(auto const& showerdataprod: showerdataproducts){
549  if(showerdataprod.first.size() > maxname){
550  maxname = showerdataprod.first.size();
551  }
552  }
553 
554  std::map<std::string,std::string> Type_showerprops;
555  std::map<std::string,std::string> Type_showerdataprods;
556  for(auto const& showerprop: showerproperties){
557  std::string Type = (showerprop.second)->GetType();
558  Type_showerprops[showerprop.first] = Type;
559  }
560  for(auto const& showerdataprod: showerdataproducts){
561  std::string Type = (showerdataprod.second)->GetType();
562  Type_showerdataprods[showerdataprod.first] = Type;
563  }
564 
565  unsigned int maxtype = 0;
566  for(auto const& Type_showerprop: Type_showerprops){
567  if(Type_showerprop.second.size() > maxtype){
568  maxtype = Type_showerprop.second.size();
569  }
570  }
571  for(auto const& Type_showerdataprod: Type_showerdataprods){
572  if(Type_showerdataprod.second.size() > maxtype){
573  maxtype = Type_showerdataprod.second.size();
574  }
575  }
576 
577  unsigned int n = maxname + maxtype + 33;
578  std::cout << std::left << std::setfill('*') << std::setw(n-1) << "*" <<std::endl;
579  std::cout << "Elements in the element holder" << std::endl;
580  std::cout << std::left << std::setfill('*') << std::setw(n-1) << "*" <<std::endl;
581  for(auto const& Type_showerprop: Type_showerprops){
582  std::cout << std::left << std::setfill(' ') << std::setw(21) << "* Property Name: " << std::setw(maxname) << Type_showerprop.first;
583  std::cout << std::left << std::setfill(' ') << " * Type: " << std::setw(maxtype) << Type_showerprop.second << " * " << std::endl;
584  }
585  for(auto const& Type_showerdataprod: Type_showerdataprods){
586  std::cout << std::left << std::setfill(' ') << std::setw(maxname) << std::setw(21) << "* Data Product Name: " << std::setw(maxname) << Type_showerdataprod.first;
587  std::cout << std::left << std::setfill(' ') << " * Type: " << std::setw(maxtype) << Type_showerdataprod.second << " *" << std::endl;
588  }
589  std::cout << std::left << std::setfill('*') << std::setw(n-1) << "*" <<std::endl;
590  std::cout << std::setfill(' ');
591  std::cout << std::setw(0);
592  return;
593  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
walls no left
Definition: selectors.fcl:105
decoded decode D Type
BEGIN_PROLOG could also be cout
template<class T >
void reco::shower::ShowerElementHolder::SetElement ( T &  dataproduct,
const std::string &  Name,
bool  checktag = false 
)
inline

Definition at line 362 of file ShowerElementHolder.hh.

362  {
363 
364  auto const showerDataProductsIt = showerdataproducts.find(Name);
365  if(showerDataProductsIt != showerdataproducts.end()){
366  reco::shower::ShowerDataProduct<T>* showerdataprod = dynamic_cast<reco::shower::ShowerDataProduct<T> *>(showerDataProductsIt->second.get());
367  showerdataprod->SetShowerElement(dataproduct);
368  showerdataprod->SetCheckTag(checktag);
369  return;
370  }
371  else{
372  showerdataproducts[Name] = std::make_unique<ShowerDataProduct<T> >(dataproduct,checktag);
373  return;
374  }
375  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
BEGIN_PROLOG vertical distance to the surface Name
template<class T , class T2 >
void reco::shower::ShowerElementHolder::SetElement ( T &  propertyval,
T2 &  propertyvalerror,
const std::string &  Name 
)
inline

Definition at line 380 of file ShowerElementHolder.hh.

380  {
381 
382  auto const showerPropertiesIt = showerproperties.find(Name);
383  if(showerPropertiesIt != showerproperties.end()){
384  reco::shower::ShowerProperty<T,T2>* showerprop = dynamic_cast<reco::shower::ShowerProperty<T,T2> *>(showerPropertiesIt->second.get());
385  showerprop->SetShowerProperty(propertyval,propertyvalerror);
386  return;
387  }
388  else{
389  showerproperties[Name] = std::make_unique<ShowerProperty<T,T2> >(propertyval,propertyvalerror);
390  return;
391  }
392  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
BEGIN_PROLOG vertical distance to the surface Name
void SetShowerProperty(T &Element, T2 &ElementErr)
void reco::shower::ShowerElementHolder::SetElementTag ( const std::string &  Name,
bool  checkelement 
)
inline

Definition at line 505 of file ShowerElementHolder.hh.

505  {
506  auto const showerDataProductsIt = showerdataproducts.find(Name);
507  if(showerDataProductsIt != showerdataproducts.end()){
508  return showerDataProductsIt->second->SetCheckTag(checkelement);
509  }
510  mf::LogError("ShowerElementHolder") << "Trying set the checking of the data product: " << Name << ". This data product does not exist in the element holder" << std::endl;
511  return;
512  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
BEGIN_PROLOG vertical distance to the surface Name
template<class T >
void reco::shower::ShowerElementHolder::SetEventElement ( T &  dataproduct,
const std::string &  Name 
)
inline

Definition at line 397 of file ShowerElementHolder.hh.

397  {
398 
399  auto const eventDataProductsIt = eventdataproducts.find(Name);
400  if (eventDataProductsIt != eventdataproducts.end()){
401  reco::shower::EventDataProduct<T>* eventdataprod = dynamic_cast<reco::shower::EventDataProduct<T> *>(eventDataProductsIt->second.get());
402  eventdataprod->SetShowerElement(dataproduct);
403  return;
404  }
405  else{
406  eventdataproducts[Name] = std::make_unique<EventDataProduct<T> >(dataproduct);
407  return;
408  }
409  }
BEGIN_PROLOG vertical distance to the surface Name
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > eventdataproducts
void reco::shower::ShowerElementHolder::SetShowerNumber ( int &  shower_iter)
inline

Definition at line 530 of file ShowerElementHolder.hh.

530  {
531  showernumber = shower_iter;
532  }

Member Data Documentation

std::map<std::string,std::unique_ptr<reco::shower::ShowerElementBase> > reco::shower::ShowerElementHolder::eventdataproducts
private

Definition at line 652 of file ShowerElementHolder.hh.

std::map<std::string,std::unique_ptr<reco::shower::ShowerElementBase> > reco::shower::ShowerElementHolder::showerdataproducts
private

Definition at line 649 of file ShowerElementHolder.hh.

int reco::shower::ShowerElementHolder::showernumber
private

Definition at line 655 of file ShowerElementHolder.hh.

std::map<std::string,std::unique_ptr<reco::shower::ShowerElementBase> > reco::shower::ShowerElementHolder::showerproperties
private

Definition at line 646 of file ShowerElementHolder.hh.


The documentation for this class was generated from the following file: