20 #include <unordered_map> 52 #define LOGERROR(x) edm::LogError(x) 53 #define LOGINFO(x) edm::LogInfo(x) 54 #define LOGDEBUG(x) LogDebug(x) 58 #include "TObjString.h" 130 isMC_(iConfig.getUntrackedParameter<
bool>(
"isMC",
false)),
151 text_ =
fs->make<TText>(0., 0.,
"");
152 text_->SetName(
"RunMode");
153 tree_ =
fs->make<TTree>(
"StripDBTree",
"Tree with DB SiStrip info");
232 LOGINFO(
"SiStripDB2Tree") <<
"@SUB=SiStripDB2Tree::getRecordInfo" 233 <<
"\nTrying to apply " <<
record.key().name() <<
" with multiple IOVs in tag.\n" 234 <<
"Validity range is " <<
first.eventID().run() <<
" - " <<
last.eventID().run() <<
"\n";
236 LOGINFO(
"SiStripDB2Tree") <<
"@SUB=SiStripDB2Tree::getRecordInfo" 237 <<
"\nTrying to apply " <<
record.key().name() <<
"Validity range is " 238 <<
first.eventID().run() <<
" - " <<
last.eventID().run() <<
"\n";
249 sprintf(c_run,
"%i", iRun.
run());
250 tree_->GetUserInfo()->Add(
new TObjString(c_run));
252 auto pedHook = this->getRecordInfo<SiStripPedestalsRcd>(iSetup);
253 auto noiseHook = this->getRecordInfo<SiStripNoisesRcd>(iSetup);
254 auto g1Hook = this->getRecordInfo<SiStripApvGainRcd>(iSetup);
255 auto g2Hook = this->getRecordInfo<SiStripApvGain2Rcd>(iSetup);
256 auto qualityHook = this->getRecordInfo<SiStripQualityRcd>(iSetup);
258 auto g1SimHook = this->getRecordInfo<SiStripApvGainSimRcd>(iSetup);
273 tree_->GetUserInfo()->Add(GTheader);
274 GTheader->printInfo();
286 LOGINFO(
"SiStripDB2Tree") <<
"We have determined this Data";
292 std::vector<uint32_t> activeDetIds;
297 for (uint32_t detid : activeDetIds) {
302 if (
isMC_ && gsimObj !=
nullptr) {
317 text_->SetText(0., 0., run_op.c_str());
318 LOGINFO(
"SiStripDB2Tree") <<
"SiStripOperationModeRcd " 319 <<
". . . " << run_op;
336 desc.setComment(
"Creates TTree with SiStrip Database tag content.");
338 desc.addUntracked<
bool>(
"isMC",
false);
340 descriptions.
add(
"SiStripDB2Tree",
desc);
static const std::string kSharedResource
void setTopoInfo(uint32_t detId, const TrackerTopology *tTopo)
T getParameter(std::string const &) const
static const char layer_[]
unsigned int tobLayer(const DetId &id) const
const Range getRange(const uint32_t &detID) const
std::pair< const char *, std::string > getRecordInfo(const edm::EventSetup &iSetup) const
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualToken_
unsigned int tidSide(const DetId &id) const
#define DEFINE_FWK_MODULE(type)
SiStripModuleGeometry moduleGeometry() const
const edm::ESGetToken< SiStripApvGain, SiStripApvGainSimRcd > gsimToken_
unsigned int tidWheel(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
ParameterSet const & getParameterSet(std::string const &) const
static const IOVSyncValue & endOfTime()
std::string to_string(const V &value)
const edm::ESGetToken< SiStripLatency, SiStripLatencyRcd > latToken_
const edm::ESGetToken< SiStripNoises, SiStripNoisesRcd > noiseToken_
std::pair< ContainerIterator, ContainerIterator > Range
const Range getRange(const uint32_t detID) const
~SiStripDB2Tree() override=default
float getPed(const uint16_t &strip, const Range &range) const
void beginRun(edm::Run const &, edm::EventSetup const &) override
const char * getIOVSince()
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
static float getNoise(uint16_t strip, const Range &range)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static const IOVSyncValue & beginOfTime()
unsigned int tecSide(const DetId &id) const
static const char ring_[]
const edm::ESGetToken< SiStripApvGain, SiStripApvGain2Rcd > g2Token_
RecordInfo(const char *record, const char *tag)
std::pair< ContainerIterator, ContainerIterator > Range
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void endRun(edm::Run const &, edm::EventSetup const &) override
SiStripDetInfo read(std::string filePath)
bool getData(T &iHolder) const
void analyze(const edm::Event &, const edm::EventSetup &) override
ParameterSet const & getProcessParameterSetContainingModule(ModuleDescription const &moduleDescription)
Detector identifier class for the strip tracker.
SiStripDB2Tree(const edm::ParameterSet &)
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
bool IsStripBad(uint32_t detid, short strip) const
Constants and enumerated types for FED/FEC systems.
const edm::ESGetToken< SiStripPedestals, SiStripPedestalsRcd > pedToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const Range getRange(const uint32_t detID) const
ModuleDescription const & moduleDescription() const
const Range getRange(const uint32_t detID) const
static float getStripGain(uint16_t strip, const Range &range)
static const uint16_t STRIPS_PER_APV
uint16_t latency(const uint32_t detId, const uint16_t apv) const
std::string dump(unsigned int indent=0) const
static constexpr char const *const kDefaultFile
unsigned int tibLayer(const DetId &id) const
std::pair< ContainerIterator, ContainerIterator > Range
void getDetIds(std::vector< uint32_t > &DetIds_) const
const edm::ESGetToken< SiStripApvGain, SiStripApvGainRcd > g1Token_