CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
SiStripFolderOrganizer Class Reference

#include <DQM/SiStripCommon/interface/SiStripFolderOrganizer.h>

Public Types

typedef dqm::legacy::DQMStore DQMStore
 

Public Member Functions

void getFolderName (int32_t rawdetid, const TrackerTopology *tTopo, std::string &lokal_folder)
 
void getLayerFolderName (std::stringstream &ss, uint32_t rawdetid, const TrackerTopology *tTopo, bool ring_flag=false)
 
void getRingFolderName (std::stringstream &ss, uint32_t rawdetid, const TrackerTopology *tTopo)
 
std::string getSiStripControlFolder (unsigned short slot=all_, unsigned short ring=all_, unsigned short addr=all_, unsigned short chan=all_)
 
std::string getSiStripFolder ()
 
std::string getSiStripTopControlFolder ()
 
std::pair< std::string, int32_t > GetSubDetAndLayer (const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=false)
 
std::pair< std::string, int32_t > GetSubDetAndLayerThickness (const uint32_t &detid, const TrackerTopology *tTopo, std::string &cThickness)
 
std::pair< std::string, int32_t > GetSubDetAndRing (const uint32_t &detid, const TrackerTopology *tTopo)
 
void getSubDetFolder (const uint32_t &detid, const TrackerTopology *tTopo, std::string &folder_name)
 
std::pair< const std::string, const char * > getSubDetFolderAndTag (const uint32_t &detid, const TrackerTopology *tTopo)
 
void getSubDetLayerFolderName (std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
 
const SiStripFolderOrganizeroperator= (const SiStripFolderOrganizer &)=delete
 
void setDetectorFolder (uint32_t rawdetid, const TrackerTopology *tTopo)
 
void setLayerFolder (uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=false)
 
void setRingFolder (uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0)
 
void setSiStripControlFolder (unsigned short slot=all_, unsigned short ring=all_, unsigned short addr=all_, unsigned short chan=all_)
 
void setSiStripFolder ()
 
void setSiStripFolderName (std::string name)
 
void setSiStripTopControlFolder ()
 
 SiStripFolderOrganizer ()
 
 SiStripFolderOrganizer (const SiStripFolderOrganizer &)=delete
 
virtual ~SiStripFolderOrganizer ()
 

Static Public Attributes

static unsigned short const all_ = 65535
 

Private Attributes

DQMStoredbe_
 
std::string TopFolderName
 

Detailed Description

Description: <Organizes the folders for the monitoring elements of the SiStrip Tracker. Its methods return strings with names of folders to be created and used.>

Usage: <usage>

Definition at line 27 of file SiStripFolderOrganizer.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 29 of file SiStripFolderOrganizer.h.

Constructor & Destructor Documentation

◆ SiStripFolderOrganizer() [1/2]

SiStripFolderOrganizer::SiStripFolderOrganizer ( )

Definition at line 33 of file SiStripFolderOrganizer.cc.

References dbe_, Utilities::operator, and TopFolderName.

33  {
34  TopFolderName = "SiStrip";
35  // get a pointer to DQMStore
37 }

◆ ~SiStripFolderOrganizer()

SiStripFolderOrganizer::~SiStripFolderOrganizer ( )
virtual

Definition at line 39 of file SiStripFolderOrganizer.cc.

39 {}

◆ SiStripFolderOrganizer() [2/2]

SiStripFolderOrganizer::SiStripFolderOrganizer ( const SiStripFolderOrganizer )
delete

Member Function Documentation

◆ getFolderName()

void SiStripFolderOrganizer::getFolderName ( int32_t  rawdetid,
const TrackerTopology tTopo,
std::string &  lokal_folder 
)

Definition at line 236 of file SiStripFolderOrganizer.cc.

References getSubDetLayerFolderName(), mergeAndRegister::rest, SEP, SiStripDetId::subDetector(), SiStripDetId::TEC, TrackerTopology::tecIsBackPetal(), TrackerTopology::tecIsStereo(), TrackerTopology::tecPetalNumber(), TrackerTopology::tecRing(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), SiStripDetId::TIB, TrackerTopology::tibIsExternalString(), TrackerTopology::tibIsZMinusSide(), TrackerTopology::tibLayer(), TrackerTopology::tibString(), SiStripDetId::TID, TrackerTopology::tidIsStereo(), TrackerTopology::tidRing(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), SiStripDetId::TOB, TrackerTopology::tobIsZMinusSide(), TrackerTopology::tobLayer(), and TrackerTopology::tobRod().

Referenced by setDetectorFolder().

236  {
237  lokal_folder = "";
238  if (rawdetid == 0) { // just top MechanicalFolder if rawdetid==0;
239  return;
240  }
241  std::stringstream rest;
242  SiStripDetId stripdet = SiStripDetId(rawdetid);
243 
244  if (stripdet.subDetector() == SiStripDetId::TIB) {
245  // --------------------------- TIB --------------------------- //
246 
247  getSubDetLayerFolderName(rest, stripdet.subDetector(), tTopo->tibLayer(rawdetid));
248 
249  if (tTopo->tibIsZMinusSide(rawdetid))
250  rest << "backward_strings" << SEP;
251  else
252  rest << "forward_strings" << SEP;
253  if (tTopo->tibIsExternalString(rawdetid))
254  rest << "external_strings" << SEP;
255  else
256  rest << "internal_strings" << SEP;
257  rest << "string_" << tTopo->tibString(rawdetid) << SEP << "module_" << rawdetid;
258  } else if (stripdet.subDetector() == SiStripDetId::TID) {
259  // --------------------------- TID --------------------------- //
260 
261  getSubDetLayerFolderName(rest, stripdet.subDetector(), tTopo->tidWheel(rawdetid), tTopo->tidSide(rawdetid));
262  rest << "ring_" << tTopo->tidRing(rawdetid) << SEP;
263 
264  if (tTopo->tidIsStereo(rawdetid))
265  rest << "stereo_modules" << SEP;
266  else
267  rest << "mono_modules" << SEP;
268  rest << "module_" << rawdetid;
269  } else if (stripdet.subDetector() == SiStripDetId::TOB) {
270  // --------------------------- TOB --------------------------- //
271 
272  getSubDetLayerFolderName(rest, stripdet.subDetector(), tTopo->tobLayer(rawdetid));
273  if (tTopo->tobIsZMinusSide(rawdetid))
274  rest << "backward_rods" << SEP;
275  else
276  rest << "forward_rods" << SEP;
277  rest << "rod_" << tTopo->tobRod(rawdetid) << SEP << "module_" << rawdetid;
278  } else if (stripdet.subDetector() == SiStripDetId::TEC) {
279  // --------------------------- TEC --------------------------- //
280 
281  getSubDetLayerFolderName(rest, stripdet.subDetector(), tTopo->tecWheel(rawdetid), tTopo->tecSide(rawdetid));
282  if (tTopo->tecIsBackPetal(rawdetid))
283  rest << "backward_petals" << SEP;
284  else
285  rest << "forward_petals" << SEP;
286 
287  rest << "petal_" << tTopo->tecPetalNumber(rawdetid) << SEP << "ring_" << tTopo->tecRing(rawdetid) << SEP;
288 
289  if (tTopo->tecIsStereo(rawdetid))
290  rest << "stereo_modules" << SEP;
291  else
292  rest << "mono_modules" << SEP;
293 
294  rest << "module_" << rawdetid;
295  } else {
296  // --------------------------- ??? --------------------------- //
297  edm::LogWarning("SiStripTkDQM|WrongInput")
298  << "no such subdetector type :" << stripdet.subDetector() << " no folder set!" << std::endl;
299  return;
300  }
301  lokal_folder += rest.str();
302 }
unsigned int tecPetalNumber(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
bool tobIsZMinusSide(const DetId &id) const
static constexpr auto TID
Definition: SiStripDetId.h:38
unsigned int tidSide(const DetId &id) const
bool tibIsExternalString(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
bool tibIsZMinusSide(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
unsigned int tibString(const DetId &id) const
SubDetector subDetector() const
Definition: SiStripDetId.h:105
unsigned int tecRing(const DetId &id) const
ring id
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
unsigned int tecSide(const DetId &id) const
static constexpr auto TOB
Definition: SiStripDetId.h:39
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
bool tecIsBackPetal(const DetId &id) const
#define SEP
bool tecIsStereo(const DetId &id) const
unsigned int tobRod(const DetId &id) const
static constexpr auto TIB
Definition: SiStripDetId.h:37
bool tidIsStereo(const DetId &id) const
unsigned int tidRing(const DetId &id) const
unsigned int tibLayer(const DetId &id) const
Log< level::Warning, false > LogWarning
static constexpr auto TEC
Definition: SiStripDetId.h:40

◆ getLayerFolderName()

void SiStripFolderOrganizer::getLayerFolderName ( std::stringstream &  ss,
uint32_t  rawdetid,
const TrackerTopology tTopo,
bool  ring_flag = false 
)

Definition at line 415 of file SiStripFolderOrganizer.cc.

References MECHANICAL_FOLDER_NAME, SEP, ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::barrel::side(), contentValuesCheck::ss, SiStripDetId::subDetector(), SiStripDetId::TEC, TrackerTopology::tecRing(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), SiStripDetId::TIB, TrackerTopology::tibLayer(), SiStripDetId::TID, TrackerTopology::tidRing(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), SiStripDetId::TOB, TrackerTopology::tobLayer(), and TopFolderName.

Referenced by SiStripMonitorDigi::createMEs(), and getRingFolderName().

418  {
420  if (rawdetid == 0) { // just top MechanicalFolder if rawdetid==0;
421  return;
422  }
423 
424  SiStripDetId stripdet = SiStripDetId(rawdetid);
425  if (stripdet.subDetector() == SiStripDetId::TIB) {
426  // --------------------------- TIB --------------------------- //
427 
428  ss << SEP << "TIB" << SEP << "layer_" << tTopo->tibLayer(rawdetid);
429  } else if (stripdet.subDetector() == SiStripDetId::TID) {
430  // --------------------------- TID --------------------------- //
431 
432  uint32_t side = tTopo->tidSide(rawdetid);
433  std::stringstream sside;
434  if (side == 1) {
435  sside << "MINUS";
436  } else if (side == 2) {
437  sside << "PLUS";
438  }
439 
440  if (ring_flag) {
441  ss << SEP << "TID" << SEP << sside.str() << SEP << "ring_" << tTopo->tidRing(rawdetid);
442  } else {
443  ss << SEP << "TID" << SEP << sside.str() << SEP << "wheel_" << tTopo->tidWheel(rawdetid);
444  }
445  } else if (stripdet.subDetector() == SiStripDetId::TOB) {
446  // --------------------------- TOB --------------------------- //
447 
448  ss << SEP << "TOB" << SEP << "layer_" << tTopo->tobLayer(rawdetid);
449  } else if (stripdet.subDetector() == SiStripDetId::TEC) {
450  // --------------------------- TEC --------------------------- //
451 
452  uint32_t side = tTopo->tecSide(rawdetid);
453  std::stringstream sside;
454  if (side == 1) {
455  sside << "MINUS";
456  } else if (side == 2) {
457  sside << "PLUS";
458  }
459 
460  if (ring_flag) {
461  ss << SEP << "TEC" << SEP << sside.str() << SEP << "ring_" << tTopo->tecRing(rawdetid);
462  } else {
463  ss << SEP << "TEC" << SEP << sside.str() << SEP << "wheel_" << tTopo->tecWheel(rawdetid);
464  }
465  } else {
466  // --------------------------- ??? --------------------------- //
467  edm::LogWarning("SiStripTkDQM|WrongInput")
468  << "no such subdetector type :" << stripdet.subDetector() << " no folder set!" << std::endl;
469  return;
470  }
471 }
unsigned int tobLayer(const DetId &id) const
static constexpr auto TID
Definition: SiStripDetId.h:38
unsigned int tidSide(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
SubDetector subDetector() const
Definition: SiStripDetId.h:105
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tecSide(const DetId &id) const
static constexpr auto TOB
Definition: SiStripDetId.h:39
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
#define SEP
static constexpr auto TIB
Definition: SiStripDetId.h:37
unsigned int tidRing(const DetId &id) const
unsigned int tibLayer(const DetId &id) const
Log< level::Warning, false > LogWarning
static constexpr auto TEC
Definition: SiStripDetId.h:40
#define MECHANICAL_FOLDER_NAME

◆ getRingFolderName()

void SiStripFolderOrganizer::getRingFolderName ( std::stringstream &  ss,
uint32_t  rawdetid,
const TrackerTopology tTopo 
)
inline

Definition at line 86 of file SiStripFolderOrganizer.h.

References getLayerFolderName(), and contentValuesCheck::ss.

86  {
87  getLayerFolderName(ss, rawdetid, tTopo, true);
88  }
void getLayerFolderName(std::stringstream &ss, uint32_t rawdetid, const TrackerTopology *tTopo, bool ring_flag=false)

◆ getSiStripControlFolder()

std::string SiStripFolderOrganizer::getSiStripControlFolder ( unsigned short  slot = all_,
unsigned short  ring = all_,
unsigned short  addr = all_,
unsigned short  chan = all_ 
)

Definition at line 61 of file SiStripFolderOrganizer.cc.

References generateTowerEtThresholdLUT::addr, all_, officialStyle::chan, fed_dqm_sourceclient-live_cfg::folder_name, getSiStripTopControlFolder(), relativeConstraints::ring, SEP, FCDTask_cfi::slot, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by setSiStripControlFolder().

68  {
69  std::stringstream lokal_folder;
70  lokal_folder << getSiStripTopControlFolder();
71  // if ( crate != all_ ) {// if ==all_ then remain in top control folder
72  // lokal_folder << SEP << "FecCrate" << crate;
73  if (slot != all_) {
74  lokal_folder << SEP << "FecSlot" << slot;
75  if (ring != all_) {
76  lokal_folder << SEP << "FecRing" << ring;
77  if (addr != all_) {
78  lokal_folder << SEP << "CcuAddr" << addr;
79  if (chan != all_) {
80  lokal_folder << SEP << "CcuChan" << chan;
81  // if ( i2c != all_ ) {
82  // lokal_folder << SEP << "I2cAddr" << i2c;
83  // }
84  }
85  }
86  }
87  }
88  // }
89  std::string folder_name = lokal_folder.str();
90  return folder_name;
91 }
std::string getSiStripTopControlFolder()
static unsigned short const all_
#define SEP
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...

◆ getSiStripFolder()

std::string SiStripFolderOrganizer::getSiStripFolder ( )

Definition at line 43 of file SiStripFolderOrganizer.cc.

References TopFolderName.

43 { return TopFolderName; }

◆ getSiStripTopControlFolder()

std::string SiStripFolderOrganizer::getSiStripTopControlFolder ( )

Definition at line 50 of file SiStripFolderOrganizer.cc.

References CONTROL_FOLDER_NAME, AlCaHLTBitMon_QueryRunRegistry::string, and TopFolderName.

Referenced by getSiStripControlFolder().

50  {
52  return lokal_folder;
53 }
#define CONTROL_FOLDER_NAME

◆ GetSubDetAndLayer()

std::pair< std::string, int32_t > SiStripFolderOrganizer::GetSubDetAndLayer ( const uint32_t &  detid,
const TrackerTopology tTopo,
bool  ring_flag = false 
)

Definition at line 106 of file SiStripFolderOrganizer.cc.

References nano_mu_digi_cff::layer, AlCaHLTBitMon_QueryRunRegistry::string, StripSubdetector::TEC, TrackerTopology::tecRing(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), StripSubdetector::TIB, TrackerTopology::tibLayer(), StripSubdetector::TID, TrackerTopology::tidRing(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), StripSubdetector::TOB, and TrackerTopology::tobLayer().

Referenced by SiStripMonitorCluster::analyze(), SiStripRecHitsValid::analyze(), SiStripMonitorTrack::book(), SiStripBaseCondObjDQM::bookSummaryCumulMEs(), SiStripBaseCondObjDQM::bookSummaryMEs(), SiStripBaseCondObjDQM::bookSummaryProfileMEs(), SiStripMonitorDigi::createMEs(), SiStripMonitorCluster::createMEs(), SiStripRecHitsValid::createMEs(), SiStripTrackingRecHitsValid::createMEs(), and SiStripCertificationInfo::fillSiStripCertificationMEs().

108  {
109  std::string cSubDet;
110  int32_t layer = 0;
111  switch (StripSubdetector::SubDetector(StripSubdetector(detid).subdetId())) {
113  cSubDet = "TIB";
114  layer = tTopo->tibLayer(detid);
115  break;
117  cSubDet = "TOB";
118  layer = tTopo->tobLayer(detid);
119  break;
121  cSubDet = "TID";
122  if (ring_flag)
123  layer = tTopo->tidRing(detid) * (tTopo->tidSide(detid) == 1 ? -1 : +1);
124  else
125  layer = tTopo->tidWheel(detid) * (tTopo->tidSide(detid) == 1 ? -1 : +1);
126  break;
128  cSubDet = "TEC";
129  if (ring_flag)
130  layer = tTopo->tecRing(detid) * (tTopo->tecSide(detid) == 1 ? -1 : +1);
131  else
132  layer = tTopo->tecWheel(detid) * (tTopo->tecSide(detid) == 1 ? -1 : +1);
133  break;
134  default:
135  edm::LogWarning("SiStripMonitorTrack") << "WARNING!!! this detid does not belong to tracker" << std::endl;
136  }
137  return std::make_pair(cSubDet, layer);
138 }
static constexpr auto TEC
unsigned int tobLayer(const DetId &id) const
unsigned int tidSide(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tecSide(const DetId &id) const
static constexpr auto TOB
static constexpr auto TIB
unsigned int tidRing(const DetId &id) const
unsigned int tibLayer(const DetId &id) const
Log< level::Warning, false > LogWarning
static constexpr auto TID

◆ GetSubDetAndLayerThickness()

std::pair< std::string, int32_t > SiStripFolderOrganizer::GetSubDetAndLayerThickness ( const uint32_t &  detid,
const TrackerTopology tTopo,
std::string &  cThickness 
)

Definition at line 140 of file SiStripFolderOrganizer.cc.

References nano_mu_digi_cff::layer, relativeConstraints::ring, AlCaHLTBitMon_QueryRunRegistry::string, StripSubdetector::TEC, TrackerTopology::tecRing(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), StripSubdetector::TIB, TrackerTopology::tibLayer(), StripSubdetector::TID, TrackerTopology::tidSide(), TrackerTopology::tidWheel(), StripSubdetector::TOB, and TrackerTopology::tobLayer().

142  {
143  std::string cSubDet;
144  int32_t layer = 0;
145  int32_t ring = 0;
146  switch (StripSubdetector::SubDetector(StripSubdetector(detid).subdetId())) {
148  cSubDet = "TIB";
149  layer = tTopo->tibLayer(detid);
150  cThickness = "THIN";
151  break;
153  cSubDet = "TOB";
154  layer = tTopo->tobLayer(detid);
155  cThickness = "THICK";
156  break;
158  cSubDet = "TID";
159  layer = tTopo->tidWheel(detid) * (tTopo->tidSide(detid) == 1 ? -1 : +1);
160  cThickness = "THIN";
161  break;
163  cSubDet = "TEC";
164  layer = tTopo->tecWheel(detid) * (tTopo->tecSide(detid) == 1 ? -1 : +1);
165  ring = tTopo->tecRing(detid) * (tTopo->tecSide(detid) == 1 ? -1 : +1);
166  if (ring >= 1 && ring <= 4)
167  cThickness = "THIN";
168  else
169  cThickness = "THICK";
170  break;
171  default:
172  edm::LogWarning("SiStripMonitorTrack") << "WARNING!!! this detid does not belong to tracker" << std::endl;
173  }
174  return std::make_pair(cSubDet, layer);
175 }
static constexpr auto TEC
unsigned int tobLayer(const DetId &id) const
unsigned int tidSide(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tecSide(const DetId &id) const
static constexpr auto TOB
static constexpr auto TIB
unsigned int tibLayer(const DetId &id) const
Log< level::Warning, false > LogWarning
static constexpr auto TID

◆ GetSubDetAndRing()

std::pair< std::string, int32_t > SiStripFolderOrganizer::GetSubDetAndRing ( const uint32_t &  detid,
const TrackerTopology tTopo 
)

Definition at line 177 of file SiStripFolderOrganizer.cc.

References relativeConstraints::ring, AlCaHLTBitMon_QueryRunRegistry::string, StripSubdetector::TEC, TrackerTopology::tecRing(), TrackerTopology::tecSide(), StripSubdetector::TIB, StripSubdetector::TID, TrackerTopology::tidRing(), TrackerTopology::tidSide(), and StripSubdetector::TOB.

178  {
179  std::string cSubDet;
180  int32_t ring = 0;
181  switch (StripSubdetector::SubDetector(StripSubdetector(detid).subdetId())) {
183  cSubDet = "TIB";
184  break;
186  cSubDet = "TOB";
187  break;
189  cSubDet = "TID";
190  ring = tTopo->tidRing(detid) * (tTopo->tidSide(detid) == 1 ? -1 : +1);
191  break;
193  cSubDet = "TEC";
194  ring = tTopo->tecRing(detid) * (tTopo->tecSide(detid) == 1 ? -1 : +1);
195  break;
196  default:
197  edm::LogWarning("SiStripMonitorTrack") << "WARNING!!! this detid does not belong to tracker" << std::endl;
198  }
199  return std::make_pair(cSubDet, ring);
200 }
static constexpr auto TEC
unsigned int tidSide(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tecSide(const DetId &id) const
static constexpr auto TOB
static constexpr auto TIB
unsigned int tidRing(const DetId &id) const
Log< level::Warning, false > LogWarning
static constexpr auto TID

◆ getSubDetFolder()

void SiStripFolderOrganizer::getSubDetFolder ( const uint32_t &  detid,
const TrackerTopology tTopo,
std::string &  folder_name 
)

Definition at line 406 of file SiStripFolderOrganizer.cc.

References fed_dqm_sourceclient-live_cfg::folder_name, and getSubDetFolderAndTag().

Referenced by SiStripQualityChecker::fillFaultyModuleStatus(), SiStripDaqInfo::findExcludedModule(), and SiStripTrackerMapCreator::getDetectorFlagAndComment().

408  {
409  std::pair<std::string, std::string> subdet_and_tag = getSubDetFolderAndTag(detid, tTopo);
410  folder_name = subdet_and_tag.first;
411 }
std::pair< const std::string, const char * > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)

◆ getSubDetFolderAndTag()

std::pair< const std::string, const char * > SiStripFolderOrganizer::getSubDetFolderAndTag ( const uint32_t &  detid,
const TrackerTopology tTopo 
)

Definition at line 475 of file SiStripFolderOrganizer.cc.

References printsummarytable::folder, MECHANICAL_FOLDER_NAME, SEP, AlCaHLTBitMon_QueryRunRegistry::string, makeGlobalPositionRcd_cfg::tag, StripSubdetector::TEC, TrackerTopology::tecSide(), StripSubdetector::TIB, StripSubdetector::TID, TrackerTopology::tidSide(), StripSubdetector::TOB, and TopFolderName.

Referenced by SiStripMonitorDigi::analyze(), SiStripMonitorCluster::analyze(), SiStripMonitorTrack::book(), SiStripMonitorDigi::createMEs(), SiStripMonitorCluster::createMEs(), SiStripRecHitsValid::createMEs(), SiStripMonitorTrack::findMEs(), and getSubDetFolder().

476  {
477  const char* subdet_folder = "";
478  const char* tag = "";
479  switch (StripSubdetector::SubDetector(StripSubdetector(detid).subdetId())) {
481  subdet_folder = "TIB";
482  tag = subdet_folder;
483  break;
485  subdet_folder = "TOB";
486  tag = subdet_folder;
487  break;
489  if (tTopo->tidSide(detid) == 2) {
490  subdet_folder = "TID/PLUS";
491  tag = "TID__PLUS";
492  } else if (tTopo->tidSide(detid) == 1) {
493  subdet_folder = "TID/MINUS";
494  tag = "TID__MINUS";
495  }
496  break;
498  if (tTopo->tecSide(detid) == 2) {
499  subdet_folder = "TEC/PLUS";
500  tag = "TEC__PLUS";
501  } else if (tTopo->tecSide(detid) == 1) {
502  subdet_folder = "TEC/MINUS";
503  tag = "TEC__MINUS";
504  }
505  break;
506  default: {
507  edm::LogWarning("SiStripCommon") << "WARNING!!! this detid does not belong to tracker" << std::endl;
508  subdet_folder = "";
509  }
510  }
511 
513  folder.reserve(TopFolderName.size() + strlen(SEP MECHANICAL_FOLDER_NAME SEP) + strlen(subdet_folder) + 1);
514  folder = TopFolderName + SEP MECHANICAL_FOLDER_NAME SEP + subdet_folder;
515 
516  return std::pair<const std::string, const char*>(folder, tag);
517 }
static constexpr auto TEC
unsigned int tidSide(const DetId &id) const
unsigned int tecSide(const DetId &id) const
static constexpr auto TOB
#define SEP
static constexpr auto TIB
Log< level::Warning, false > LogWarning
static constexpr auto TID
#define MECHANICAL_FOLDER_NAME

◆ getSubDetLayerFolderName()

void SiStripFolderOrganizer::getSubDetLayerFolderName ( std::stringstream &  ss,
SiStripDetId::SubDetector  subDet,
uint32_t  layer,
uint32_t  side = 0 
)

Definition at line 208 of file SiStripFolderOrganizer.cc.

References nano_mu_digi_cff::layer, MECHANICAL_FOLDER_NAME, SEP, ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::barrel::side(), contentValuesCheck::ss, SiStripDetId::TEC, SiStripDetId::TIB, SiStripDetId::TID, SiStripDetId::TOB, and TopFolderName.

Referenced by TkHistoMap::folderDefinition(), and getFolderName().

211  {
212  // std::cout << "[SiStripFolderOrganizer::getSubDetLayerFolderName] TopFolderName: " << TopFolderName << std::endl;
214 
215  std::stringstream sside;
216  if (side == 1) {
217  sside << "MINUS";
218  } else if (side == 2) {
219  sside << "PLUS";
220  }
221 
222  if (subDet == SiStripDetId::TIB) {
223  ss << SEP << "TIB" << SEP << "layer_" << layer << SEP;
224  } else if (subDet == SiStripDetId::TID) {
225  ss << SEP << "TID" << SEP << sside.str() << SEP << "wheel_" << layer << SEP;
226  } else if (subDet == SiStripDetId::TOB) {
227  ss << SEP << "TOB" << SEP << "layer_" << layer << SEP;
228  } else if (subDet == SiStripDetId::TEC) {
229  ss << SEP << "TEC" << SEP << sside.str() << SEP << "wheel_" << layer << SEP;
230  } else {
231  // --------------------------- ??? --------------------------- //
232  edm::LogWarning("SiStripTkDQM|WrongInput") << "no such SubDet :" << subDet << " no folder set!" << std::endl;
233  }
234 }
static constexpr auto TID
Definition: SiStripDetId.h:38
static constexpr auto TOB
Definition: SiStripDetId.h:39
#define SEP
static constexpr auto TIB
Definition: SiStripDetId.h:37
Log< level::Warning, false > LogWarning
static constexpr auto TEC
Definition: SiStripDetId.h:40
#define MECHANICAL_FOLDER_NAME

◆ operator=()

const SiStripFolderOrganizer& SiStripFolderOrganizer::operator= ( const SiStripFolderOrganizer )
delete

◆ setDetectorFolder()

void SiStripFolderOrganizer::setDetectorFolder ( uint32_t  rawdetid,
const TrackerTopology tTopo 
)

◆ setLayerFolder()

void SiStripFolderOrganizer::setLayerFolder ( uint32_t  rawdetid,
const TrackerTopology tTopo,
int32_t  layer = 0,
bool  ring_flag = false 
)

Definition at line 304 of file SiStripFolderOrganizer.cc.

References funct::abs(), dbe_, nano_mu_digi_cff::layer, MECHANICAL_FOLDER_NAME, mergeAndRegister::rest, SEP, dqm::implementation::DQMStore::setCurrentFolder(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::barrel::side(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripDetId::subDetector(), SiStripDetId::TEC, TrackerTopology::tecRing(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), SiStripDetId::TIB, TrackerTopology::tibLayer(), SiStripDetId::TID, TrackerTopology::tidRing(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), SiStripDetId::TOB, TrackerTopology::tobLayer(), and TopFolderName.

Referenced by SiStripMonitorTrack::book(), SiStripBaseCondObjDQM::bookSummaryCumulMEs(), SiStripBaseCondObjDQM::bookSummaryMEs(), SiStripBaseCondObjDQM::bookSummaryProfileMEs(), MonitorTrackResidualsBase< pixel_or_strip >::createMEs(), SiStripMonitorDigi::createMEs(), SiStripMonitorCluster::createMEs(), SiStripRecHitsValid::createMEs(), SiStripTrackingRecHitsValid::createMEs(), and setRingFolder().

307  {
309  if (rawdetid == 0) { // just top MechanicalFolder if rawdetid==0;
310  dbe_->setCurrentFolder(lokal_folder);
311  return;
312  }
313 
314  std::ostringstream rest;
315  SiStripDetId stripdet = SiStripDetId(rawdetid);
316  if (stripdet.subDetector() == SiStripDetId::TIB) {
317  // --------------------------- TIB --------------------------- //
318 
319  int tib_layer = tTopo->tibLayer(rawdetid);
320  if (abs(layer) != tib_layer) {
321  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")
322  << " expect " << abs(layer) << " but getting " << tTopo->tibLayer(rawdetid) << std::endl;
323  return;
324  }
325  rest << SEP << "TIB" << SEP << "layer_" << tTopo->tibLayer(rawdetid);
326  } else if (stripdet.subDetector() == SiStripDetId::TID) {
327  // --------------------------- TID --------------------------- //
328 
329  int tid_ring = tTopo->tidRing(rawdetid);
330 
331  // side
332  uint32_t side = tTopo->tidSide(rawdetid);
333  std::stringstream sside;
334  if (side == 1) {
335  sside << "MINUS";
336  } else if (side == 2) {
337  sside << "PLUS";
338  }
339 
340  if (ring_flag) {
341  if (abs(layer) != tid_ring) {
342  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")
343  << " expect " << abs(layer) << " but getting " << tTopo->tidRing(rawdetid) << std::endl;
344  return;
345  }
346  rest << SEP << "TID" << SEP << sside.str() << SEP << "ring_" << tTopo->tidRing(rawdetid);
347  } else {
348  int tid_wheel = tTopo->tidWheel(rawdetid);
349  if (abs(layer) != tid_wheel) {
350  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")
351  << " expect " << abs(layer) << " but getting " << tTopo->tidWheel(rawdetid) << std::endl;
352  return;
353  }
354  rest << SEP << "TID" << SEP << sside.str() << SEP << "wheel_" << tTopo->tidWheel(rawdetid);
355  }
356  } else if (stripdet.subDetector() == SiStripDetId::TOB) {
357  // --------------------------- TOB --------------------------- //
358 
359  int tob_layer = tTopo->tobLayer(rawdetid);
360  if (abs(layer) != tob_layer) {
361  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")
362  << " expect " << abs(layer) << " but getting " << tTopo->tobLayer(rawdetid) << std::endl;
363  return;
364  }
365  rest << SEP << "TOB" << SEP << "layer_" << tTopo->tobLayer(rawdetid);
366  } else if (stripdet.subDetector() == SiStripDetId::TEC) {
367  // --------------------------- TEC --------------------------- //
368 
369  // side
370  uint32_t side = tTopo->tecSide(rawdetid);
371  std::stringstream sside;
372  if (side == 1) {
373  sside << "MINUS";
374  } else if (side == 2) {
375  sside << "PLUS";
376  }
377 
378  if (ring_flag) {
379  int tec_ring = tTopo->tecRing(rawdetid);
380  if (abs(layer) != tec_ring) {
381  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")
382  << " expect " << abs(layer) << " but getting " << tTopo->tecRing(rawdetid) << std::endl;
383  return;
384  }
385  rest << SEP << "TEC" << SEP << sside.str() << SEP << "ring_" << tTopo->tecRing(rawdetid);
386  } else {
387  int tec_wheel = tTopo->tecWheel(rawdetid);
388  if (abs(layer) != tec_wheel) {
389  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")
390  << " expect " << abs(layer) << " but getting " << tTopo->tecWheel(rawdetid) << std::endl;
391  return;
392  }
393  rest << SEP << "TEC" << SEP << sside.str() << SEP << "wheel_" << tTopo->tecWheel(rawdetid);
394  }
395  } else {
396  // --------------------------- ??? --------------------------- //
397  edm::LogWarning("SiStripTkDQM|WrongInput")
398  << "no such subdetector type :" << stripdet.subDetector() << " no folder set!" << std::endl;
399  return;
400  }
401 
402  lokal_folder += rest.str();
403  dbe_->setCurrentFolder(lokal_folder);
404 }
unsigned int tobLayer(const DetId &id) const
static constexpr auto TID
Definition: SiStripDetId.h:38
unsigned int tidSide(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:656
SubDetector subDetector() const
Definition: SiStripDetId.h:105
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tecSide(const DetId &id) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static constexpr auto TOB
Definition: SiStripDetId.h:39
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
#define SEP
static constexpr auto TIB
Definition: SiStripDetId.h:37
unsigned int tidRing(const DetId &id) const
unsigned int tibLayer(const DetId &id) const
Log< level::Warning, false > LogWarning
static constexpr auto TEC
Definition: SiStripDetId.h:40
#define MECHANICAL_FOLDER_NAME

◆ setRingFolder()

void SiStripFolderOrganizer::setRingFolder ( uint32_t  rawdetid,
const TrackerTopology tTopo,
int32_t  layer = 0 
)
inline

Definition at line 83 of file SiStripFolderOrganizer.h.

References nano_mu_digi_cff::layer, and setLayerFolder().

83  {
84  setLayerFolder(rawdetid, tTopo, layer, true);
85  }
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=false)

◆ setSiStripControlFolder()

void SiStripFolderOrganizer::setSiStripControlFolder ( unsigned short  slot = all_,
unsigned short  ring = all_,
unsigned short  addr = all_,
unsigned short  chan = all_ 
)

Definition at line 93 of file SiStripFolderOrganizer.cc.

References generateTowerEtThresholdLUT::addr, officialStyle::chan, dbe_, getSiStripControlFolder(), relativeConstraints::ring, dqm::implementation::DQMStore::setCurrentFolder(), FCDTask_cfi::slot, and AlCaHLTBitMon_QueryRunRegistry::string.

100  {
102  dbe_->setCurrentFolder(lokal_folder);
103  return;
104 }
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:656
std::string getSiStripControlFolder(unsigned short slot=all_, unsigned short ring=all_, unsigned short addr=all_, unsigned short chan=all_)
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...

◆ setSiStripFolder()

void SiStripFolderOrganizer::setSiStripFolder ( )

◆ setSiStripFolderName()

void SiStripFolderOrganizer::setSiStripFolderName ( std::string  name)

◆ setSiStripTopControlFolder()

void SiStripFolderOrganizer::setSiStripTopControlFolder ( )

Member Data Documentation

◆ all_

unsigned short const SiStripFolderOrganizer::all_ = 65535
static

Definition at line 31 of file SiStripFolderOrganizer.h.

Referenced by getSiStripControlFolder().

◆ dbe_

DQMStore* SiStripFolderOrganizer::dbe_
private

◆ TopFolderName

std::string SiStripFolderOrganizer::TopFolderName
private