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 213 of file ShowerElementHolder.hh.

Member Function Documentation

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

Definition at line 432 of file ShowerElementHolder.hh.

432  {
433  bool checked = true;
434  for(auto const& showerprop: showerproperties){
435  checked *= showerprop.second->CheckShowerElement();
436  }
437  for(auto const& showerdataprod: showerdataproducts){
438  checked *= showerdataprod.second->CheckShowerElement();
439  }
440  return checked;
441  }
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 512 of file ShowerElementHolder.hh.

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

Definition at line 415 of file ShowerElementHolder.hh.

415  {
416  auto const showerPropertiesIt = showerproperties.find(Name);
417  if(showerPropertiesIt != showerproperties.end()){
418  return showerPropertiesIt->second->CheckShowerElement();
419  }
420  auto const showerDataProductsIt = showerdataproducts.find(Name);
421  if(showerDataProductsIt != showerdataproducts.end()){
422  return showerDataProductsIt->second->CheckShowerElement();
423  }
424  auto const eventDataProductsIt = eventdataproducts.find(Name);
425  if(eventDataProductsIt!= eventdataproducts.end()){
426  return eventDataProductsIt->second->CheckShowerElement();
427  }
428  return false;
429  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
ChannelGroupService::Name 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 480 of file ShowerElementHolder.hh.

480  {
481  auto const showerDataProductsIt = showerdataproducts.find(Name);
482  if(showerDataProductsIt != showerdataproducts.end()){
483  return showerDataProductsIt->second->CheckTag();
484  }
485  return false;
486  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
ChannelGroupService::Name Name
bool reco::shower::ShowerElementHolder::CheckEventElement ( const std::string Name) const
inline

Definition at line 409 of file ShowerElementHolder.hh.

409  {
410  auto const eventDataProductsIt = eventdataproducts.find(Name);
411  return eventDataProductsIt == eventdataproducts.end() ? false : eventDataProductsIt->second->CheckShowerElement();
412  }
ChannelGroupService::Name Name
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > eventdataproducts
void reco::shower::ShowerElementHolder::ClearAll ( )
inline

Definition at line 474 of file ShowerElementHolder.hh.

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

Definition at line 445 of file ShowerElementHolder.hh.

445  {
446  auto const showerPropertiesIt = showerproperties.find(Name);
447  if(showerPropertiesIt != showerproperties.end()){
448  return showerPropertiesIt->second->Clear();
449  }
450  auto const showerDataProductsIt = showerdataproducts.find(Name);
451  if(showerDataProductsIt != showerdataproducts.end()){
452  return showerDataProductsIt->second->Clear();
453  }
454  mf::LogError("ShowerElementHolder") << "Trying to clear Element: " << Name << ". This element does not exist in the element holder" << std::endl;
455  return;
456  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
ChannelGroupService::Name Name
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
QTextStream & endl(QTextStream &s)
void reco::shower::ShowerElementHolder::ClearEvent ( )
inline

Definition at line 468 of file ShowerElementHolder.hh.

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

Definition at line 459 of file ShowerElementHolder.hh.

459  {
460  for(auto const& showerprop: showerproperties){
461  (showerprop.second)->Clear();
462  }
463  for(auto const& showerdataproduct: showerdataproducts){
464  (showerdataproduct.second)->Clear();
465  }
466  }
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 489 of file ShowerElementHolder.hh.

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

Definition at line 219 of file ShowerElementHolder.hh.

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

Definition at line 306 of file ShowerElementHolder.hh.

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

Definition at line 344 of file ShowerElementHolder.hh.

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

Definition at line 270 of file ShowerElementHolder.hh.

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

Definition at line 290 of file ShowerElementHolder.hh.

290  {
291  auto const eventDataProductsIt = eventdataproducts.find(Name);
292  if (eventDataProductsIt != eventdataproducts.end()){
293  if(eventDataProductsIt->second->CheckShowerElement()){
294  reco::shower::ShowerElementAccessor<T> *eventprop = dynamic_cast<reco::shower::ShowerElementAccessor<T> *>(eventDataProductsIt->second.get());
295  if(eventprop == nullptr){
296  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element you are filling is not the correct type" << std::endl;
297  }
298  return eventprop->GetShowerElementRef();
299  }
300  }
301  throw cet::exception("ShowerElementHolder") << "Trying to get Element: " << Name << ". This element does not exist in the element holder" << std::endl;
302  }
ChannelGroupService::Name Name
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > eventdataproducts
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
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 604 of file ShowerElementHolder.hh.

605  {
606 
607  const std::string name("FMP_" + moduleTag.label() + "_" + getType<T1>() + "_" + getType<T2>());
608 
609  if (CheckEventElement(name)){
610  return GetEventElement<art::FindManyP<T1> >(name);
611  } else {
612  art::FindManyP<T1> findManyP(handle, evt, moduleTag);
613  if (findManyP.isValid()){
614  SetEventElement(findManyP, name);
615  return GetEventElement<art::FindManyP<T1> >(name);
616  } else {
617  throw cet::exception("ShowerElementHolder") << "FindManyP is not valid: " << name << std::endl;
618  }
619  }
620  }
static QCString name
Definition: declinfo.cpp:673
std::string string
Definition: nybbler.cc:12
void SetEventElement(T &dataproduct, const std::string &Name)
std::string const & label() const noexcept
Definition: InputTag.cc:79
bool CheckEventElement(const std::string &Name) const
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
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 623 of file ShowerElementHolder.hh.

624  {
625 
626  const std::string name("FOP_" + moduleTag.label() + "_" + getType<T1>() + "_" + getType<T2>());
627 
628  if (CheckEventElement(name)){
629  return GetEventElement<art::FindOneP<T1> >(name);
630  } else {
631  art::FindOneP<T1> findOneP(handle, evt, moduleTag);
632  if (findOneP.isValid()){
633  SetEventElement(findOneP, name);
634  return GetEventElement<art::FindOneP<T1> >(name);
635  } else {
636  throw cet::exception("ShowerElementHolder") << "FindOneP is not valid: " << name << std::endl;
637  }
638  }
639  }
static QCString name
Definition: declinfo.cpp:673
std::string string
Definition: nybbler.cc:12
void SetEventElement(T &dataproduct, const std::string &Name)
std::string const & label() const noexcept
Definition: InputTag.cc:79
bool CheckEventElement(const std::string &Name) const
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
int reco::shower::ShowerElementHolder::GetShowerNumber ( ) const
inline

Definition at line 533 of file ShowerElementHolder.hh.

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

Definition at line 594 of file ShowerElementHolder.hh.

594  {
595  return cet::demangle_symbol(typeid(object).name());
596  }
static QCString name
Definition: declinfo.cpp:673
template<class T >
std::string reco::shower::ShowerElementHolder::getType ( ) const
inline

Definition at line 599 of file ShowerElementHolder.hh.

599  {
600  return cet::demangle_symbol(typeid(T).name());
601  }
static QCString name
Definition: declinfo.cpp:673
void reco::shower::ShowerElementHolder::PrintElements ( ) const
inline

Definition at line 538 of file ShowerElementHolder.hh.

538  {
539 
540  unsigned int maxname = 0;
541  for(auto const& showerprop: showerproperties){
542  if(showerprop.first.size() > maxname){
543  maxname = showerprop.first.size();
544  }
545  }
546  for(auto const& showerdataprod: showerdataproducts){
547  if(showerdataprod.first.size() > maxname){
548  maxname = showerdataprod.first.size();
549  }
550  }
551 
552  std::map<std::string,std::string> Type_showerprops;
553  std::map<std::string,std::string> Type_showerdataprods;
554  for(auto const& showerprop: showerproperties){
555  std::string Type = (showerprop.second)->GetType();
556  Type_showerprops[showerprop.first] = Type;
557  }
558  for(auto const& showerdataprod: showerdataproducts){
559  std::string Type = (showerdataprod.second)->GetType();
560  Type_showerdataprods[showerdataprod.first] = Type;
561  }
562 
563  unsigned int maxtype = 0;
564  for(auto const& Type_showerprop: Type_showerprops){
565  if(Type_showerprop.second.size() > maxtype){
566  maxtype = Type_showerprop.second.size();
567  }
568  }
569  for(auto const& Type_showerdataprod: Type_showerdataprods){
570  if(Type_showerdataprod.second.size() > maxtype){
571  maxtype = Type_showerdataprod.second.size();
572  }
573  }
574 
575  unsigned int n = maxname + maxtype + 33;
576  std::cout << std::left << std::setfill('*') << std::setw(n-1) << "*" <<std::endl;
577  std::cout << "Elements in the element holder" << std::endl;
578  std::cout << std::left << std::setfill('*') << std::setw(n-1) << "*" <<std::endl;
579  for(auto const& Type_showerprop: Type_showerprops){
580  std::cout << std::left << std::setfill(' ') << std::setw(21) << "* Property Name: " << std::setw(maxname) << Type_showerprop.first;
581  std::cout << std::left << std::setfill(' ') << " * Type: " << std::setw(maxtype) << Type_showerprop.second << " * " << std::endl;
582  }
583  for(auto const& Type_showerdataprod: Type_showerdataprods){
584  std::cout << std::left << std::setfill(' ') << std::setw(maxname) << std::setw(21) << "* Data Product Name: " << std::setw(maxname) << Type_showerdataprod.first;
585  std::cout << std::left << std::setfill(' ') << " * Type: " << std::setw(maxtype) << Type_showerdataprod.second << " *" << std::endl;
586  }
587  std::cout << std::left << std::setfill('*') << std::setw(n-1) << "*" <<std::endl;
588  std::cout << std::setfill(' ');
589  std::cout << std::setw(0);
590  return;
591  }
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerdataproducts
int Type
Definition: 018_def.c:12
std::string string
Definition: nybbler.cc:12
std::map< std::string, std::unique_ptr< reco::shower::ShowerElementBase > > showerproperties
std::void_t< T > n
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
Q_EXPORT QTSManip setfill(int f)
Definition: qtextstream.h:337
QTextStream & endl(QTextStream &s)
template<class T >
void reco::shower::ShowerElementHolder::SetElement ( T &  dataproduct,
const std::string Name,
bool  checktag = false 
)
inline

Definition at line 360 of file ShowerElementHolder.hh.

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

Definition at line 378 of file ShowerElementHolder.hh.

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

Definition at line 503 of file ShowerElementHolder.hh.

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

Definition at line 395 of file ShowerElementHolder.hh.

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

Definition at line 528 of file ShowerElementHolder.hh.

528  {
529  showernumber = shower_iter;
530  }

Member Data Documentation

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

Definition at line 650 of file ShowerElementHolder.hh.

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

Definition at line 647 of file ShowerElementHolder.hh.

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

Definition at line 653 of file ShowerElementHolder.hh.

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

Definition at line 644 of file ShowerElementHolder.hh.


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