CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
edm::PrintEventSetupContent Class Reference
Inheritance diagram for edm::PrintEventSetupContent:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 PrintEventSetupContent (ParameterSet const &)
 
 ~PrintEventSetupContent ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Private Member Functions

virtual void analyze (Event const &, EventSetup const &) override
 
virtual void beginJob () override
 
virtual void beginLuminosityBlock (LuminosityBlock const &, EventSetup const &) override
 
virtual void beginRun (Run const &, EventSetup const &) override
 
virtual void endJob () override
 
void print (EventSetup const &)
 

Private Attributes

std::map
< eventsetup::EventSetupRecordKey,
unsigned long long > 
cacheIdentifiers_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 42 of file PrintEventSetupContent.cc.

Constructor & Destructor Documentation

PrintEventSetupContent::PrintEventSetupContent ( ParameterSet const &  )
explicit

Definition at line 74 of file PrintEventSetupContent.cc.

74  {
75  //now do what ever initialization is neededEventSetupRecordDataGetter::EventSetupRecordDataGetter(ParameterSet const& iConfig):
76  // getter = new EventSetupRecordDataGetter::EventSetupRecordDataGetter(iConfig);
77  }
PrintEventSetupContent::~PrintEventSetupContent ( )

Definition at line 79 of file PrintEventSetupContent.cc.

79  {
80  // do anything here that needs to be done at desctruction time
81  // (e.g. close files, deallocate resources etc.)
82  }

Member Function Documentation

void PrintEventSetupContent::analyze ( Event const &  ,
EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 90 of file PrintEventSetupContent.cc.

References print().

90  {
91  print(iSetup);
92  }
void print(EventSetup const &)
void PrintEventSetupContent::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 150 of file PrintEventSetupContent.cc.

150  {
151  }
void PrintEventSetupContent::beginLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &  iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 100 of file PrintEventSetupContent.cc.

References print().

100  {
101  print(iSetup);
102  }
void print(EventSetup const &)
void PrintEventSetupContent::beginRun ( Run const &  ,
EventSetup const &  iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 95 of file PrintEventSetupContent.cc.

References print().

95  {
96  print(iSetup);
97  }
void print(EventSetup const &)
void PrintEventSetupContent::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 155 of file PrintEventSetupContent.cc.

155  {
156  }
void PrintEventSetupContent::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 160 of file PrintEventSetupContent.cc.

References edm::ConfigurationDescriptions::add(), and edm::ConfigurationDescriptions::setComment().

160  {
162  descriptions.setComment("Print what data is available in each available EventSetup Record in the job.\n"
163  "As part of the data is the C++ class type, label and which module makes that data.");
164  descriptions.add("printEventSetupContent", desc);
165  }
void PrintEventSetupContent::print ( EventSetup const &  iSetup)
private

Definition at line 105 of file PrintEventSetupContent.cc.

References edm::eventsetup::EventSetupRecord::cacheIdentifier(), cacheIdentifiers_, data, edm::IOVSyncValue::eventID(), edm::EventSetup::fillAvailableRecordKeys(), edm::eventsetup::EventSetupRecord::fillRegisteredDataKeys(), edm::EventSetup::find(), edm::ValidityInterval::first(), edm::eventsetup::ComponentDescription::label_, edm::ValidityInterval::last(), edm::eventsetup::EventSetupRecord::providerDescription(), edm::IOVSyncValue::time(), edm::eventsetup::ComponentDescription::type_, edm::eventsetup::EventSetupRecord::validityInterval(), and edm::Timestamp::value().

Referenced by analyze(), beginLuminosityBlock(), and beginRun().

105  {
106  typedef std::vector<eventsetup::EventSetupRecordKey> Records;
107  typedef std::vector<eventsetup::DataKey> Data;
108 
109  Records records;
110  Data data;
111  iSetup.fillAvailableRecordKeys(records);
112  int iflag=0;
113 
114  for(Records::iterator itrecords = records.begin(), itrecordsend = records.end();
115  itrecords != itrecordsend; ++itrecords ) {
116 
117  eventsetup::EventSetupRecord const* rec = iSetup.find(*itrecords);
118 
119  if(0 != rec && cacheIdentifiers_[*itrecords] != rec->cacheIdentifier() ) {
120  ++iflag;
121  if(iflag==1) {
122  LogSystem("ESContent") << "\n" << "Changed Record" << "\n " << "<datatype>" << " " << "'label' provider: 'provider label' <provider module type>";
123  }
124  cacheIdentifiers_[*itrecords] = rec->cacheIdentifier();
125  LogAbsolute("ESContent") << itrecords->name() << std::endl;
126 
127  LogAbsolute("ESContent") << " start: " << rec->validityInterval().first().eventID() << " time: " << rec->validityInterval().first().time().value() << std::endl;
128  LogAbsolute("ESContent") << " end: " << rec->validityInterval().last().eventID() << " time: " << rec->validityInterval().last().time().value() << std::endl;
129  rec->fillRegisteredDataKeys(data);
130  for(Data::iterator itdata = data.begin(), itdataend = data.end(); itdata != itdataend; ++itdata){
131  edm::eventsetup::ComponentDescription const* cd = rec->providerDescription(*itdata);
132  LogAbsolute("ESContent") << " " << itdata->type().name() << " '" << itdata->name().value() << "'" << " provider:'" << cd->label_ << "' " << cd->type_ << std::endl;
133  }
134  }
135  }
136  }
std::map< eventsetup::EventSetupRecordKey, unsigned long long > cacheIdentifiers_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82

Member Data Documentation

std::map<eventsetup::EventSetupRecordKey, unsigned long long > edm::PrintEventSetupContent::cacheIdentifiers_
private

Definition at line 60 of file PrintEventSetupContent.cc.

Referenced by print().