CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
TotemDAQMappingESSourceXML Class Reference

Loads TotemDAQMapping and TotemAnalysisMask from two XML files. More...

Inheritance diagram for TotemDAQMappingESSourceXML:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Classes

struct  ConfigBlock
 

Public Member Functions

edm::ESProducts< std::unique_ptr< TotemDAQMapping >, std::unique_ptr< TotemAnalysisMask > > produce (const TotemReadoutRcd &)
 
 TotemDAQMappingESSourceXML (const edm::ParameterSet &)
 
 ~TotemDAQMappingESSourceXML () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
bool concurrentFinder () const
 
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
 EventSetupRecordIntervalFinder (const EventSetupRecordIntervalFinder &)=delete
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
bool nonconcurrentAndIOVNeedsUpdate (const eventsetup::EventSetupRecordKey &key, const IOVSyncValue &syncValue) const
 
const EventSetupRecordIntervalFinderoperator= (const EventSetupRecordIntervalFinder &)=delete
 
void resetInterval (const eventsetup::EventSetupRecordKey &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Static Public Attributes

static const std::string tagAnalysisMask = "analysisMask"
 
static const std::string tagArm = "arm"
 Common position tags. More...
 
static const std::string tagChannel = "channel"
 
static const std::string tagChip1 = "vfat"
 COMMON Chip XML tags. More...
 
static const std::string tagChip2 = "test_vfat"
 
static const std::string tagDiamondCh = "diamond_channel"
 
static const std::string tagDiamondPlane = "rp_plane_diamond"
 diamond specific tags More...
 
static const std::string tagRPPlane = "rp_plane"
 
static const std::string tagRPPot = "rp_detector_set"
 
static const std::string tagRPStation = "station"
 RP XML tags. More...
 
static const std::string tagSampicBoard = "rp_sampic_board"
 totem timing specific tags More...
 
static const std::string tagSampicCh = "rp_sampic_channel"
 
static const std::string tagTotemTimingCh = "timing_channel"
 
static const std::string tagTotemTimingPlane = "timing_plane"
 
static const std::string tagVFAT = "vfat"
 

Protected Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 sets infinite validity of this data More...
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Types

enum  NodeType {
  nUnknown, nSkip, nTop, nArm,
  nRPStation, nRPPot, nRPPlane, nDiamondPlane,
  nChip, nDiamondCh, nChannel, nSampicBoard,
  nSampicChannel, nTotemTimingPlane, nTotemTimingCh
}
 enumeration of XML node types More...
 
enum  ParseType { pMapping, pMask }
 whether to parse a mapping of a mask XML More...
 

Private Member Functions

TotemFramePosition ChipFramePosition (xercesc::DOMNode *chipnode)
 extracts VFAT's DAQ channel from XML attributes More...
 
bool CommonNode (NodeType type)
 
string CompleteFileName (const string &fn)
 adds the path prefix, if needed More...
 
bool DiamondNode (NodeType type)
 
void GetChannels (xercesc::DOMNode *n, std::set< unsigned char > &channels)
 
string GetNodeContent (xercesc::DOMNode *parent)
 returns the content of the node More...
 
NodeType GetNodeType (xercesc::DOMNode *)
 determines node type More...
 
string GetNodeValue (xercesc::DOMNode *node)
 returns the value of the node More...
 
void ParseTreeDiamond (ParseType, xercesc::DOMNode *, NodeType, unsigned int parentID, const std::unique_ptr< TotemDAQMapping > &, const std::unique_ptr< TotemAnalysisMask > &)
 recursive method to extract RP-related information from the DOM tree More...
 
void ParseTreeRP (ParseType, xercesc::DOMNode *, NodeType, unsigned int parentID, const std::unique_ptr< TotemDAQMapping > &, const std::unique_ptr< TotemAnalysisMask > &)
 recursive method to extract RP-related information from the DOM tree More...
 
void ParseTreeTotemTiming (ParseType, xercesc::DOMNode *, NodeType, unsigned int parentID, const std::unique_ptr< TotemDAQMapping > &, const std::unique_ptr< TotemAnalysisMask > &)
 recursive method to extract RP-related information from the DOM tree More...
 
void ParseXML (ParseType, const string &file, const std::unique_ptr< TotemDAQMapping > &, const std::unique_ptr< TotemAnalysisMask > &)
 parses XML file More...
 
bool RPNode (NodeType type)
 
bool Test (xercesc::DOMNode *node, const std::string &name)
 returns true iff the node is of the given name More...
 
bool TotemTimingNode (NodeType type)
 

Private Attributes

vector< ConfigBlockconfiguration
 
unsigned int currentBlock
 index of the current block in 'configuration' array More...
 
bool currentBlockValid
 flag whether the 'currentBlock' index is valid More...
 
std::vector< std::string > mappingFileNames
 the mapping files More...
 
string subSystemName
 label of the CTPPS sub-system More...
 
unsigned int verbosity
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 

Detailed Description

Loads TotemDAQMapping and TotemAnalysisMask from two XML files.

Definition at line 52 of file TotemDAQMappingESSourceXML.cc.

Member Enumeration Documentation

◆ NodeType

enumeration of XML node types

Enumerator
nUnknown 
nSkip 
nTop 
nArm 
nRPStation 
nRPPot 
nRPPlane 
nDiamondPlane 
nChip 
nDiamondCh 
nChannel 
nSampicBoard 
nSampicChannel 
nTotemTimingPlane 
nTotemTimingCh 

Definition at line 114 of file TotemDAQMappingESSourceXML.cc.

114  {
115  nUnknown,
116  nSkip,
117  nTop,
118  nArm,
119  nRPStation,
120  nRPPot,
121  nRPPlane,
123  nChip,
124  nDiamondCh,
125  nChannel,
126  nSampicBoard,
130  };

◆ ParseType

whether to parse a mapping of a mask XML

Enumerator
pMapping 
pMask 

Definition at line 133 of file TotemDAQMappingESSourceXML.cc.

133 { pMapping, pMask };

Constructor & Destructor Documentation

◆ TotemDAQMappingESSourceXML()

TotemDAQMappingESSourceXML::TotemDAQMappingESSourceXML ( const edm::ParameterSet conf)

Definition at line 245 of file TotemDAQMappingESSourceXML.cc.

246  : verbosity(conf.getUntrackedParameter<unsigned int>("verbosity", 0)),
247  subSystemName(conf.getUntrackedParameter<string>("subSystem")),
248  currentBlock(0),
249  currentBlockValid(false) {
250  for (const auto &it : conf.getParameter<vector<ParameterSet>>("configuration")) {
251  ConfigBlock b;
252  b.validityRange = it.getParameter<EventRange>("validityRange");
253  b.mappingFileNames = it.getParameter<vector<string>>("mappingFileNames");
254  b.maskFileNames = it.getParameter<vector<string>>("maskFileNames");
255  configuration.push_back(b);
256  }
257 
259  findingRecord<TotemReadoutRcd>();
260 }

References b, configuration, edm::ParameterSet::getParameter(), edm::ESProducer::setWhatProduced(), and subSystemName.

◆ ~TotemDAQMappingESSourceXML()

TotemDAQMappingESSourceXML::~TotemDAQMappingESSourceXML ( )
override

Definition at line 307 of file TotemDAQMappingESSourceXML.cc.

307 {}

Member Function Documentation

◆ ChipFramePosition()

TotemFramePosition TotemDAQMappingESSourceXML::ChipFramePosition ( xercesc::DOMNode *  chipnode)
private

extracts VFAT's DAQ channel from XML attributes

Definition at line 777 of file TotemDAQMappingESSourceXML.cc.

777  {
779  unsigned char attributeFlag = 0;
780 
781  DOMNamedNodeMap *attr = chipnode->getAttributes();
782  for (unsigned int j = 0; j < attr->getLength(); j++) {
783  DOMNode *a = attr->item(j);
784  if (fp.setXMLAttribute(
785  cms::xerces::toString(a->getNodeName()), cms::xerces::toString(a->getNodeValue()), attributeFlag) > 1) {
786  throw cms::Exception("TotemDAQMappingESSourceXML")
787  << "Unrecognized tag `" << cms::xerces::toString(a->getNodeName()) << "' or incompatible value `"
788  << cms::xerces::toString(a->getNodeValue()) << "'.";
789  }
790  }
791 
792  if (!fp.checkXMLAttributeFlag(attributeFlag)) {
793  throw cms::Exception("TotemDAQMappingESSourceXML")
794  << "Wrong/incomplete DAQ channel specification (attributeFlag = " << attributeFlag << ").";
795  }
796 
797  return fp;
798 }

References a, Exception, personalPlayback::fp, dqmiolumiharvest::j, and cms::xerces::toString().

Referenced by ParseTreeDiamond(), ParseTreeRP(), and ParseTreeTotemTiming().

◆ CommonNode()

bool TotemDAQMappingESSourceXML::CommonNode ( NodeType  type)
inlineprivate

Definition at line 202 of file TotemDAQMappingESSourceXML.cc.

202 { return ((type == nChip) || (type == nArm)); }

◆ CompleteFileName()

string TotemDAQMappingESSourceXML::CompleteFileName ( const string &  fn)
private

adds the path prefix, if needed

Definition at line 311 of file TotemDAQMappingESSourceXML.cc.

311  {
312  FileInPath fip(fn);
313  return fip.fullPath();
314 }

References personalPlayback::fn, and edm::FileInPath::fullPath().

Referenced by produce().

◆ DiamondNode()

bool TotemDAQMappingESSourceXML::DiamondNode ( NodeType  type)
inlineprivate

Definition at line 192 of file TotemDAQMappingESSourceXML.cc.

192  {
193  return ((type == nArm) || (type == nRPStation) || (type == nRPPot) || (type == nDiamondPlane) ||
194  (type == nDiamondCh));
195  }

Referenced by ParseTreeDiamond().

◆ GetChannels()

void TotemDAQMappingESSourceXML::GetChannels ( xercesc::DOMNode *  n,
std::set< unsigned char > &  channels 
)
private

Definition at line 845 of file TotemDAQMappingESSourceXML.cc.

845  {
846  DOMNodeList *children = n->getChildNodes();
847  for (unsigned int i = 0; i < children->getLength(); i++) {
848  DOMNode *n = children->item(i);
849  if (n->getNodeType() != DOMNode::ELEMENT_NODE || !Test(n, "channel"))
850  continue;
851 
852  DOMNamedNodeMap *attr = n->getAttributes();
853  bool idSet = false;
854  for (unsigned int j = 0; j < attr->getLength(); j++) {
855  DOMNode *a = attr->item(j);
856 
857  if (!strcmp(cms::xerces::toString(a->getNodeName()).c_str(), "id")) {
858  unsigned int id = 0;
859  sscanf(cms::xerces::toString(a->getNodeValue()).c_str(), "%u", &id);
860  channels.insert(id);
861  idSet = true;
862  break;
863  }
864  }
865 
866  if (!idSet) {
867  throw cms::Exception("TotemDAQMappingESSourceXML::GetChannels") << "Channel tags must have an `id' attribute.";
868  }
869  }
870 }

References a, ewkTauDQM_cfi::channels, class-composition::children, Exception, mps_fire::i, triggerObjects_cff::id, dqmiolumiharvest::j, dqmiodumpmetadata::n, Test(), and cms::xerces::toString().

Referenced by ParseTreeRP().

◆ GetNodeContent()

string TotemDAQMappingESSourceXML::GetNodeContent ( xercesc::DOMNode *  parent)
inlineprivate

returns the content of the node

Definition at line 178 of file TotemDAQMappingESSourceXML.cc.

178 { return string(cms::xerces::toString(parent->getTextContent())); }

References class-composition::parent, AlCaHLTBitMon_QueryRunRegistry::string, and cms::xerces::toString().

◆ GetNodeType()

TotemDAQMappingESSourceXML::NodeType TotemDAQMappingESSourceXML::GetNodeType ( xercesc::DOMNode *  n)
private

determines node type

Definition at line 802 of file TotemDAQMappingESSourceXML.cc.

802  {
803  // common node types
804  if (Test(n, tagArm))
805  return nArm;
806  if (Test(n, tagChip1))
807  return nChip;
808  if (Test(n, tagChip2))
809  return nChip;
810 
811  // RP node types
812  if (Test(n, tagRPStation))
813  return nRPStation;
814  if (Test(n, tagRPPot))
815  return nRPPot;
816  if (Test(n, tagRPPlane))
817  return nRPPlane;
818 
819  //diamond specifics
820  if (Test(n, tagDiamondCh))
821  return nDiamondCh;
822  if (Test(n, tagDiamondPlane))
823  return nDiamondPlane;
824 
825  //totem timing specifics
826  if (Test(n, tagSampicBoard))
827  return nSampicBoard;
828  if (Test(n, tagSampicCh))
829  return nSampicChannel;
830  if (Test(n, tagTotemTimingCh))
831  return nTotemTimingCh;
832  if (Test(n, tagTotemTimingPlane))
833  return nTotemTimingPlane;
834 
835  // for backward compatibility
836  if (Test(n, "trigger_vfat"))
837  return nSkip;
838 
839  throw cms::Exception("TotemDAQMappingESSourceXML::GetNodeType")
840  << "Unknown tag `" << cms::xerces::toString(n->getNodeName()) << "'.\n";
841 }

References Exception, dqmiodumpmetadata::n, nArm, nChip, nDiamondCh, nDiamondPlane, nRPPlane, nRPPot, nRPStation, nSampicBoard, nSampicChannel, nSkip, nTotemTimingCh, nTotemTimingPlane, tagArm, tagChip1, tagChip2, tagDiamondCh, tagDiamondPlane, tagRPPlane, tagRPPot, tagRPStation, tagSampicBoard, tagSampicCh, tagTotemTimingCh, tagTotemTimingPlane, Test(), and cms::xerces::toString().

Referenced by ParseTreeDiamond(), ParseTreeRP(), and ParseTreeTotemTiming().

◆ GetNodeValue()

string TotemDAQMappingESSourceXML::GetNodeValue ( xercesc::DOMNode *  node)
inlineprivate

returns the value of the node

Definition at line 181 of file TotemDAQMappingESSourceXML.cc.

181 { return cms::xerces::toString(node->getNodeValue()); }

References cms::xerces::toString().

◆ ParseTreeDiamond()

void TotemDAQMappingESSourceXML::ParseTreeDiamond ( ParseType  pType,
xercesc::DOMNode *  parent,
NodeType  parentType,
unsigned int  parentID,
const std::unique_ptr< TotemDAQMapping > &  mapping,
const std::unique_ptr< TotemAnalysisMask > &  mask 
)
private

recursive method to extract RP-related information from the DOM tree

Definition at line 517 of file TotemDAQMappingESSourceXML.cc.

522  {
523 #ifdef DEBUG
524  printf(">> TotemDAQMappingESSourceXML::ParseTreeDiamond(%s, %u, %u)\n",
525  cms::xerces::toString(parent->getNodeName()),
526  parentType,
527  parentID);
528 #endif
529 
530  DOMNodeList *children = parent->getChildNodes();
531 
532  for (unsigned int i = 0; i < children->getLength(); i++) {
533  DOMNode *n = children->item(i);
534  if (n->getNodeType() != DOMNode::ELEMENT_NODE)
535  continue;
536 
538 #ifdef DEBUG
539  printf("\tname = %s, type = %u\n", cms::xerces::toString(n->getNodeName()), type);
540 #endif
541 
542  // structure control
543  if (!DiamondNode(type))
544  continue;
545 
546  NodeType expectedParentType;
547  switch (type) {
548  case nArm:
549  expectedParentType = nTop;
550  break;
551  case nRPStation:
552  expectedParentType = nArm;
553  break;
554  case nRPPot:
555  expectedParentType = nRPStation;
556  break;
557  case nDiamondPlane:
558  expectedParentType = nRPPot;
559  break;
560  case nDiamondCh:
561  expectedParentType = nDiamondPlane;
562  break;
563  default:
564  expectedParentType = nUnknown;
565  break;
566  }
567 
568  if (expectedParentType != parentType) {
569  throw cms::Exception("TotemDAQMappingESSourceXML")
570  << "Node " << cms::xerces::toString(n->getNodeName()) << " not allowed within "
571  << cms::xerces::toString(parent->getNodeName()) << " block.\n";
572  }
573 
574  // parse tag attributes
575  unsigned int id = 0, hw_id = 0;
576  bool id_set = false, hw_id_set = false;
577  DOMNamedNodeMap *attr = n->getAttributes();
578 
579  for (unsigned int j = 0; j < attr->getLength(); j++) {
580  DOMNode *a = attr->item(j);
581 
582  if (!strcmp(cms::xerces::toString(a->getNodeName()).c_str(), "id")) {
583  sscanf(cms::xerces::toString(a->getNodeValue()).c_str(), "%u", &id);
584  id_set = true;
585  }
586 
587  if (!strcmp(cms::xerces::toString(a->getNodeName()).c_str(), "hw_id")) {
588  sscanf(cms::xerces::toString(a->getNodeValue()).c_str(), "%x", &hw_id);
589  hw_id_set = true;
590  }
591  }
592 
593  // content control
594  if (!id_set)
595  throw cms::Exception("TotemDAQMappingESSourceXML::ParseTreeDiamond")
596  << "id not given for element `" << cms::xerces::toString(n->getNodeName()) << "'";
597 
598  if (!hw_id_set && type == nDiamondCh && pType == pMapping)
599  throw cms::Exception("TotemDAQMappingESSourceXML::ParseTreeDiamond")
600  << "hw_id not given for element `" << cms::xerces::toString(n->getNodeName()) << "'";
601 
602  if (type == nDiamondPlane && id > 3)
603  throw cms::Exception("TotemDAQMappingESSourceXML::ParseTreeDiamond")
604  << "Plane IDs range from 0 to 3. id = " << id << " is invalid.";
605 
606 #ifdef DEBUG
607  printf("\tID found: 0x%x\n", id);
608 #endif
609 
610  // store mapping data
611  if (pType == pMapping && type == nDiamondCh) {
612  const TotemFramePosition &framepos = ChipFramePosition(n);
613 
614  TotemVFATInfo vfatInfo;
615  vfatInfo.hwID = hw_id;
616 
617  if (type == nDiamondCh) {
618  unsigned int ArmNum = (parentID / 10000) % 10;
619  unsigned int StationNum = (parentID / 1000) % 10;
620  unsigned int RpNum = (parentID / 100) % 10;
621  unsigned int PlaneNum = (parentID % 100);
622 
623  vfatInfo.symbolicID.symbolicID = CTPPSDiamondDetId(ArmNum, StationNum, RpNum, PlaneNum, id);
624  }
625 
626  mapping->insert(framepos, vfatInfo);
627 
628  continue;
629  }
630 
631  unsigned int childId;
632  if (pType == pMapping && type == nDiamondPlane)
633  childId = parentID * 100 + id;
634  else
635  childId = parentID * 10 + id;
636 
637  ParseTreeDiamond(pType, n, type, childId, mapping, mask);
638  }
639 }

References a, class-composition::children, ChipFramePosition(), DiamondNode(), Exception, GetNodeType(), TotemVFATInfo::hwID, mps_fire::i, triggerObjects_cff::id, dqmiolumiharvest::j, taus_updatedMVAIds_cff::mapping, dqmiodumpmetadata::n, nArm, nDiamondCh, nDiamondPlane, nRPPot, nRPStation, nTop, nUnknown, class-composition::parent, pMapping, TotemSymbID::symbolicID, TotemVFATInfo::symbolicID, and cms::xerces::toString().

Referenced by ParseXML().

◆ ParseTreeRP()

void TotemDAQMappingESSourceXML::ParseTreeRP ( ParseType  pType,
xercesc::DOMNode *  parent,
NodeType  parentType,
unsigned int  parentID,
const std::unique_ptr< TotemDAQMapping > &  mapping,
const std::unique_ptr< TotemAnalysisMask > &  mask 
)
private

recursive method to extract RP-related information from the DOM tree

Definition at line 372 of file TotemDAQMappingESSourceXML.cc.

377  {
378 #ifdef DEBUG
379  printf(">> TotemDAQMappingESSourceXML::ParseTreeRP(%s, %u, %u)\n",
380  cms::xerces::toString(parent->getNodeName()),
381  parentType,
382  parentID);
383 #endif
384 
385  DOMNodeList *children = parent->getChildNodes();
386 
387  for (unsigned int i = 0; i < children->getLength(); i++) {
388  DOMNode *n = children->item(i);
389  if (n->getNodeType() != DOMNode::ELEMENT_NODE)
390  continue;
391 
393 
394 #ifdef DEBUG
395  printf("\tname = %s, type = %u\n", cms::xerces::toString(n->getNodeName()), type);
396 #endif
397 
398  // structure control
399  if (!RPNode(type))
400  continue;
401 
402  NodeType expectedParentType;
403  switch (type) {
404  case nArm:
405  expectedParentType = nTop;
406  break;
407  case nRPStation:
408  expectedParentType = nArm;
409  break;
410  case nRPPot:
411  expectedParentType = nRPStation;
412  break;
413  case nRPPlane:
414  expectedParentType = nRPPot;
415  break;
416  case nChip:
417  expectedParentType = nRPPlane;
418  break;
419  case nChannel:
420  expectedParentType = nChip;
421  break;
422  default:
423  expectedParentType = nUnknown;
424  break;
425  }
426 
427  if (expectedParentType != parentType) {
428  throw cms::Exception("TotemDAQMappingESSourceXML")
429  << "Node " << cms::xerces::toString(n->getNodeName()) << " not allowed within "
430  << cms::xerces::toString(parent->getNodeName()) << " block.\n";
431  }
432 
433  // parse tag attributes
434  unsigned int id = 0, hw_id = 0;
435  bool id_set = false, hw_id_set = false;
436  bool fullMask = false;
437  DOMNamedNodeMap *attr = n->getAttributes();
438 
439  for (unsigned int j = 0; j < attr->getLength(); j++) {
440  DOMNode *a = attr->item(j);
441 
442  if (!strcmp(cms::xerces::toString(a->getNodeName()).c_str(), "id")) {
443  sscanf(cms::xerces::toString(a->getNodeValue()).c_str(), "%u", &id);
444  id_set = true;
445  }
446 
447  if (!strcmp(cms::xerces::toString(a->getNodeName()).c_str(), "hw_id")) {
448  sscanf(cms::xerces::toString(a->getNodeValue()).c_str(), "%x", &hw_id);
449  hw_id_set = true;
450  }
451 
452  if (!strcmp(cms::xerces::toString(a->getNodeName()).c_str(), "full_mask"))
453  fullMask = (strcmp(cms::xerces::toString(a->getNodeValue()).c_str(), "no") != 0);
454  }
455 
456  // content control
457  if (!id_set)
458  throw cms::Exception("TotemDAQMappingESSourceXML::ParseTreeRP")
459  << "id not given for element `" << cms::xerces::toString(n->getNodeName()) << "'";
460 
461  if (!hw_id_set && type == nChip && pType == pMapping)
462  throw cms::Exception("TotemDAQMappingESSourceXML::ParseTreeRP")
463  << "hw_id not given for element `" << cms::xerces::toString(n->getNodeName()) << "'";
464 
465  if (type == nRPPlane && id > 9)
466  throw cms::Exception("TotemDAQMappingESSourceXML::ParseTreeRP")
467  << "Plane IDs range from 0 to 9. id = " << id << " is invalid.";
468 
469 #ifdef DEBUG
470  printf("\tID found: 0x%x\n", id);
471 #endif
472 
473  // store mapping data
474  if (pType == pMapping && type == nChip) {
475  const TotemFramePosition &framepos = ChipFramePosition(n);
476  TotemVFATInfo vfatInfo;
477  vfatInfo.hwID = hw_id;
478 
479  const unsigned int armIdx = (parentID / 1000) % 10;
480  const unsigned int stIdx = (parentID / 100) % 10;
481  const unsigned int rpIdx = (parentID / 10) % 10;
482  const unsigned int plIdx = parentID % 10;
483 
484  vfatInfo.symbolicID.symbolicID = TotemRPDetId(armIdx, stIdx, rpIdx, plIdx, id);
485 
486  mapping->insert(framepos, vfatInfo);
487 
488  continue;
489  }
490 
491  // store mask data
492  if (pType == pMask && type == nChip) {
493  const unsigned int armIdx = (parentID / 1000) % 10;
494  const unsigned int stIdx = (parentID / 100) % 10;
495  const unsigned int rpIdx = (parentID / 10) % 10;
496  const unsigned int plIdx = parentID % 10;
497 
498  TotemSymbID symbId;
499  symbId.symbolicID = TotemRPDetId(armIdx, stIdx, rpIdx, plIdx, id);
500 
502  am.fullMask = fullMask;
504 
505  mask->insert(symbId, am);
506 
507  continue;
508  }
509 
510  // recursion (deeper in the tree)
511  ParseTreeRP(pType, n, type, parentID * 10 + id, mapping, mask);
512  }
513 }

References a, class-composition::children, ChipFramePosition(), Exception, TotemVFATAnalysisMask::fullMask, GetChannels(), GetNodeType(), TotemVFATInfo::hwID, mps_fire::i, triggerObjects_cff::id, dqmiolumiharvest::j, taus_updatedMVAIds_cff::mapping, TotemVFATAnalysisMask::maskedChannels, dqmiodumpmetadata::n, nArm, nChannel, nChip, nRPPlane, nRPPot, nRPStation, nTop, nUnknown, class-composition::parent, pMapping, pMask, RPNode(), TotemSymbID::symbolicID, TotemVFATInfo::symbolicID, and cms::xerces::toString().

Referenced by ParseXML().

◆ ParseTreeTotemTiming()

void TotemDAQMappingESSourceXML::ParseTreeTotemTiming ( ParseType  pType,
xercesc::DOMNode *  parent,
NodeType  parentType,
unsigned int  parentID,
const std::unique_ptr< TotemDAQMapping > &  mapping,
const std::unique_ptr< TotemAnalysisMask > &  mask 
)
private

recursive method to extract RP-related information from the DOM tree

Definition at line 643 of file TotemDAQMappingESSourceXML.cc.

648  {
649  DOMNodeList *children = parent->getChildNodes();
650 
651  // Fill map hwId -> TotemTimingPlaneChannelPair
652  for (unsigned int i = 0; i < children->getLength(); i++) {
653  DOMNode *child = children->item(i);
654  if ((child->getNodeType() != DOMNode::ELEMENT_NODE) || (GetNodeType(child) != nTotemTimingCh))
655  continue;
656 
657  int plane = -1;
658  DOMNamedNodeMap *attr = parent->getAttributes();
659  for (unsigned int j = 0; j < attr->getLength(); j++) {
660  DOMNode *a = attr->item(j);
661 
662  if (!strcmp(cms::xerces::toString(a->getNodeName()).c_str(), "id"))
663  sscanf(cms::xerces::toString(a->getNodeValue()).c_str(), "%d", &plane);
664  }
665 
666  int channel = -1;
667  unsigned int hwId = 0;
668  attr = child->getAttributes();
669  for (unsigned int j = 0; j < attr->getLength(); j++) {
670  DOMNode *a = attr->item(j);
671 
672  if (!strcmp(cms::xerces::toString(a->getNodeName()).c_str(), "id"))
673  sscanf(cms::xerces::toString(a->getNodeValue()).c_str(), "%d", &channel);
674  if (!strcmp(cms::xerces::toString(a->getNodeName()).c_str(), "hwId"))
675  sscanf(cms::xerces::toString(a->getNodeValue()).c_str(), "%x", &hwId);
676  }
677 
678  mapping->totemTimingChannelMap[(uint8_t)hwId] = TotemDAQMapping::TotemTimingPlaneChannelPair(plane, channel);
679  }
680 
681  for (unsigned int i = 0; i < children->getLength(); i++) {
682  DOMNode *n = children->item(i);
683  if (n->getNodeType() != DOMNode::ELEMENT_NODE)
684  continue;
685 
687 
688  // structure control
689  if (!TotemTimingNode(type))
690  continue;
691 
692  NodeType expectedParentType;
693  switch (type) {
694  case nArm:
695  expectedParentType = nTop;
696  break;
697  case nRPStation:
698  expectedParentType = nArm;
699  break;
700  case nRPPot:
701  expectedParentType = nRPStation;
702  break;
703  case nSampicBoard:
704  expectedParentType = nRPPot;
705  break;
706  case nSampicChannel:
707  expectedParentType = nSampicBoard;
708  break;
709  case nTotemTimingPlane:
710  expectedParentType = nRPPot;
711  break;
712  case nTotemTimingCh:
713  expectedParentType = nTotemTimingPlane;
714  break;
715  default:
716  expectedParentType = nUnknown;
717  break;
718  }
719 
720  if (expectedParentType != parentType) {
721  throw cms::Exception("TotemDAQMappingESSourceXML")
722  << "Node " << cms::xerces::toString(n->getNodeName()) << " not allowed within "
723  << cms::xerces::toString(parent->getNodeName()) << " block.\n";
724  }
725 
726  // parse tag attributes
727  unsigned int id = 0;
728  bool id_set = false;
729  DOMNamedNodeMap *attr = n->getAttributes();
730 
731  for (unsigned int j = 0; j < attr->getLength(); j++) {
732  DOMNode *a = attr->item(j);
733 
734  if (!strcmp(cms::xerces::toString(a->getNodeName()).c_str(), "id")) {
735  sscanf(cms::xerces::toString(a->getNodeValue()).c_str(), "%u", &id);
736  id_set = true;
737  }
738  }
739 
740  // content control
741  if (!id_set)
742  throw cms::Exception("TotemDAQMappingESSourceXML::ParseTreeTotemTiming")
743  << "id not given for element `" << cms::xerces::toString(n->getNodeName()) << "'";
744  if (type == nSampicBoard && id > 5)
745  throw cms::Exception("TotemDAQMappingESSourceXML::ParseTreeTotemTiming")
746  << "SampicBoard IDs range from 0 to 5. id = " << id << " is invalid.";
747 
748  // store mapping data
749  if (pType == pMapping && type == nSampicChannel) {
750  const TotemFramePosition &framepos = ChipFramePosition(n);
751 
752  TotemVFATInfo vfatInfo;
753  unsigned int ArmNum = (parentID / 10000) % 10;
754  unsigned int StationNum = (parentID / 1000) % 10;
755  unsigned int RpNum = (parentID / 100) % 10;
756 
758  ArmNum, StationNum, RpNum, 0, TotemTimingDetId::ID_NOT_SET); //Dynamical: it is encoded in the frame
759 
760  mapping->insert(framepos, vfatInfo);
761 
762  continue;
763  }
764 
765  unsigned int childId;
766  if (pType == pMapping && type == nSampicBoard)
767  childId = parentID * 100 + id;
768  else
769  childId = parentID * 10 + id;
770 
771  ParseTreeTotemTiming(pType, n, type, childId, mapping, mask);
772  }
773 }

References a, class-composition::children, ChipFramePosition(), Exception, GetNodeType(), mps_fire::i, triggerObjects_cff::id, TotemTimingDetId::ID_NOT_SET, dqmiolumiharvest::j, taus_updatedMVAIds_cff::mapping, dqmiodumpmetadata::n, nArm, nRPPot, nRPStation, nSampicBoard, nSampicChannel, nTop, nTotemTimingCh, nTotemTimingPlane, nUnknown, class-composition::parent, pMapping, TotemSymbID::symbolicID, TotemVFATInfo::symbolicID, cms::xerces::toString(), and TotemTimingNode().

Referenced by ParseXML().

◆ ParseXML()

void TotemDAQMappingESSourceXML::ParseXML ( ParseType  pType,
const string &  file,
const std::unique_ptr< TotemDAQMapping > &  mapping,
const std::unique_ptr< TotemAnalysisMask > &  mask 
)
private

parses XML file

Definition at line 345 of file TotemDAQMappingESSourceXML.cc.

348  {
349  unique_ptr<XercesDOMParser> parser(new XercesDOMParser());
350  parser->parse(file.c_str());
351 
352  DOMDocument *domDoc = parser->getDocument();
353 
354  if (!domDoc)
355  throw cms::Exception("TotemDAQMappingESSourceXML::ParseXML")
356  << "Cannot parse file `" << file << "' (domDoc = NULL).";
357 
358  DOMElement *elementRoot = domDoc->getDocumentElement();
359 
360  if (!elementRoot)
361  throw cms::Exception("TotemDAQMappingESSourceXML::ParseXML") << "File `" << file << "' is empty.";
362 
363  ParseTreeRP(pType, elementRoot, nTop, 0, mapping, mask);
364 
365  ParseTreeDiamond(pType, elementRoot, nTop, 0, mapping, mask);
366 
367  ParseTreeTotemTiming(pType, elementRoot, nTop, 0, mapping, mask);
368 }

References Exception, FrontierConditions_GlobalTag_cff::file, taus_updatedMVAIds_cff::mapping, nTop, writedatasetfile::parser, ParseTreeDiamond(), ParseTreeRP(), and ParseTreeTotemTiming().

Referenced by produce().

◆ produce()

edm::ESProducts< std::unique_ptr< TotemDAQMapping >, std::unique_ptr< TotemAnalysisMask > > TotemDAQMappingESSourceXML::produce ( const TotemReadoutRcd )

Definition at line 319 of file TotemDAQMappingESSourceXML.cc.

319  {
321 
322  auto mapping = std::make_unique<TotemDAQMapping>();
323  auto mask = std::make_unique<TotemAnalysisMask>();
324 
325  // initialize Xerces
327 
328  // load mapping files
329  for (const auto &fn : configuration[currentBlock].mappingFileNames)
331 
332  // load mask files
333  for (const auto &fn : configuration[currentBlock].maskFileNames)
335 
336  // release Xerces
338 
339  // commit the products
341 }

References cms::cuda::assert(), CompleteFileName(), configuration, currentBlock, currentBlockValid, personalPlayback::fn, taus_updatedMVAIds_cff::mapping, mappingFileNames, ctppsRawToDigi_cff::maskFileNames, eostools::move(), ParseXML(), pMapping, pMask, edm::es::products(), cms::concurrency::xercesInitialize(), and cms::concurrency::xercesTerminate().

◆ RPNode()

bool TotemDAQMappingESSourceXML::RPNode ( NodeType  type)
inlineprivate

Definition at line 188 of file TotemDAQMappingESSourceXML.cc.

188  {
189  return ((type == nArm) || (type == nRPStation) || (type == nRPPot) || (type == nRPPlane) || (type == nChip));
190  }

Referenced by ParseTreeRP().

◆ setIntervalFor()

void TotemDAQMappingESSourceXML::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey key,
const edm::IOVSyncValue iosv,
edm::ValidityInterval oValidity 
)
overrideprotectedvirtual

sets infinite validity of this data

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 264 of file TotemDAQMappingESSourceXML.cc.

266  {
267  LogVerbatim("TotemDAQMappingESSourceXML") << ">> TotemDAQMappingESSourceXML::setIntervalFor(" << key.name() << ")";
268 
269  LogVerbatim("TotemDAQMappingESSourceXML")
270  << " run=" << iosv.eventID().run() << ", event=" << iosv.eventID().event();
271 
272  currentBlockValid = false;
273  for (unsigned int idx = 0; idx < configuration.size(); ++idx) {
274  const auto &bl = configuration[idx];
275 
276  edm::EventRange range = bl.validityRange;
277 
278  // If "<run>:min" is specified in python config, it is translated into event <run>:0:1.
279  // However, the truly minimal event id often found in data is <run>:0:0. Therefore the
280  // adjustment below is needed.
281  if (range.startEventID().luminosityBlock() == 0 && range.startEventID().event() == 1)
282  range = edm::EventRange(edm::EventID(range.startEventID().run(), 0, 0), range.endEventID());
283 
284  if (edm::contains(range, iosv.eventID())) {
285  currentBlockValid = true;
286  currentBlock = idx;
287 
288  const IOVSyncValue begin(range.startEventID());
289  const IOVSyncValue end(range.endEventID());
290  oValidity = edm::ValidityInterval(begin, end);
291 
292  LogVerbatim("TotemDAQMappingESSourceXML") << " block found: index=" << currentBlock << ", interval=("
293  << range.startEventID() << " - " << range.endEventID() << ")";
294 
295  return;
296  }
297  }
298 
299  if (!currentBlockValid) {
300  throw cms::Exception("TotemDAQMappingESSourceXML::setIntervalFor")
301  << "No configuration for event " << iosv.eventID();
302  }
303 }

References configuration, edm::contains(), currentBlock, currentBlockValid, mps_fire::end, edm::EventID::event(), edm::IOVSyncValue::eventID(), Exception, heavyIonCSV_trainingSettings::idx, crabWrapper::key, FastTimerService_cff::range, and edm::EventID::run().

◆ Test()

bool TotemDAQMappingESSourceXML::Test ( xercesc::DOMNode *  node,
const std::string &  name 
)
inlineprivate

returns true iff the node is of the given name

Definition at line 170 of file TotemDAQMappingESSourceXML.cc.

170  {
171  return !(name.compare(cms::xerces::toString(node->getNodeName())));
172  }

References Skims_PA_cff::name, and cms::xerces::toString().

Referenced by GetChannels(), and GetNodeType().

◆ TotemTimingNode()

bool TotemDAQMappingESSourceXML::TotemTimingNode ( NodeType  type)
inlineprivate

Definition at line 197 of file TotemDAQMappingESSourceXML.cc.

197  {
198  return ((type == nArm) || (type == nRPStation) || (type == nRPPot) || (type == nSampicBoard) ||
200  }

Referenced by ParseTreeTotemTiming().

Member Data Documentation

◆ configuration

vector<ConfigBlock> TotemDAQMappingESSourceXML::configuration
private

◆ currentBlock

unsigned int TotemDAQMappingESSourceXML::currentBlock
private

index of the current block in 'configuration' array

Definition at line 108 of file TotemDAQMappingESSourceXML.cc.

Referenced by produce(), and setIntervalFor().

◆ currentBlockValid

bool TotemDAQMappingESSourceXML::currentBlockValid
private

flag whether the 'currentBlock' index is valid

Definition at line 111 of file TotemDAQMappingESSourceXML.cc.

Referenced by produce(), and setIntervalFor().

◆ mappingFileNames

std::vector<std::string> TotemDAQMappingESSourceXML::mappingFileNames
private

the mapping files

Definition at line 92 of file TotemDAQMappingESSourceXML.cc.

Referenced by produce().

◆ subSystemName

string TotemDAQMappingESSourceXML::subSystemName
private

label of the CTPPS sub-system

Definition at line 89 of file TotemDAQMappingESSourceXML.cc.

Referenced by TotemDAQMappingESSourceXML().

◆ tagAnalysisMask

const string TotemDAQMappingESSourceXML::tagAnalysisMask = "analysisMask"
static

Definition at line 56 of file TotemDAQMappingESSourceXML.cc.

◆ tagArm

const string TotemDAQMappingESSourceXML::tagArm = "arm"
static

Common position tags.

Definition at line 59 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagChannel

const string TotemDAQMappingESSourceXML::tagChannel = "channel"
static

Definition at line 55 of file TotemDAQMappingESSourceXML.cc.

◆ tagChip1

const string TotemDAQMappingESSourceXML::tagChip1 = "vfat"
static

COMMON Chip XML tags.

Definition at line 67 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagChip2

const string TotemDAQMappingESSourceXML::tagChip2 = "test_vfat"
static

Definition at line 68 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagDiamondCh

const string TotemDAQMappingESSourceXML::tagDiamondCh = "diamond_channel"
static

Definition at line 72 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagDiamondPlane

const string TotemDAQMappingESSourceXML::tagDiamondPlane = "rp_plane_diamond"
static

diamond specific tags

Definition at line 71 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagRPPlane

const string TotemDAQMappingESSourceXML::tagRPPlane = "rp_plane"
static

Definition at line 64 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagRPPot

const string TotemDAQMappingESSourceXML::tagRPPot = "rp_detector_set"
static

Definition at line 63 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagRPStation

const string TotemDAQMappingESSourceXML::tagRPStation = "station"
static

RP XML tags.

Definition at line 62 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagSampicBoard

const string TotemDAQMappingESSourceXML::tagSampicBoard = "rp_sampic_board"
static

totem timing specific tags

Definition at line 75 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagSampicCh

const string TotemDAQMappingESSourceXML::tagSampicCh = "rp_sampic_channel"
static

Definition at line 76 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagTotemTimingCh

const string TotemDAQMappingESSourceXML::tagTotemTimingCh = "timing_channel"
static

Definition at line 77 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagTotemTimingPlane

const string TotemDAQMappingESSourceXML::tagTotemTimingPlane = "timing_plane"
static

Definition at line 78 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagVFAT

const string TotemDAQMappingESSourceXML::tagVFAT = "vfat"
static

Definition at line 54 of file TotemDAQMappingESSourceXML.cc.

◆ verbosity

unsigned int TotemDAQMappingESSourceXML::verbosity
private

Definition at line 86 of file TotemDAQMappingESSourceXML.cc.

TotemDAQMappingESSourceXML::ParseTreeTotemTiming
void ParseTreeTotemTiming(ParseType, xercesc::DOMNode *, NodeType, unsigned int parentID, const std::unique_ptr< TotemDAQMapping > &, const std::unique_ptr< TotemAnalysisMask > &)
recursive method to extract RP-related information from the DOM tree
Definition: TotemDAQMappingESSourceXML.cc:643
TotemDAQMappingESSourceXML::subSystemName
string subSystemName
label of the CTPPS sub-system
Definition: TotemDAQMappingESSourceXML.cc:89
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
TotemDAQMappingESSourceXML::tagSampicCh
static const std::string tagSampicCh
Definition: TotemDAQMappingESSourceXML.cc:76
TotemDAQMappingESSourceXML::tagDiamondCh
static const std::string tagDiamondCh
Definition: TotemDAQMappingESSourceXML.cc:72
mps_fire.i
i
Definition: mps_fire.py:428
TotemDAQMappingESSourceXML::ParseTreeDiamond
void ParseTreeDiamond(ParseType, xercesc::DOMNode *, NodeType, unsigned int parentID, const std::unique_ptr< TotemDAQMapping > &, const std::unique_ptr< TotemAnalysisMask > &)
recursive method to extract RP-related information from the DOM tree
Definition: TotemDAQMappingESSourceXML.cc:517
TotemDAQMappingESSourceXML::configuration
vector< ConfigBlock > configuration
Definition: TotemDAQMappingESSourceXML.cc:105
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
TotemVFATAnalysisMask::fullMask
bool fullMask
whether all channels of the VFAT shall be masked
Definition: TotemAnalysisMask.h:33
TotemTimingDetId::ID_NOT_SET
Definition: TotemTimingDetId.h:32
TotemDAQMappingESSourceXML::NodeType
NodeType
enumeration of XML node types
Definition: TotemDAQMappingESSourceXML.cc:114
TotemDAQMappingESSourceXML::GetNodeType
NodeType GetNodeType(xercesc::DOMNode *)
determines node type
Definition: TotemDAQMappingESSourceXML.cc:802
class-composition.children
children
Definition: class-composition.py:88
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
cms::cuda::assert
assert(be >=bs)
writedatasetfile.parser
parser
Definition: writedatasetfile.py:7
personalPlayback.fp
fp
Definition: personalPlayback.py:523
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
TotemDAQMappingESSourceXML::tagChip2
static const std::string tagChip2
Definition: TotemDAQMappingESSourceXML.cc:68
TotemDAQMappingESSourceXML::GetChannels
void GetChannels(xercesc::DOMNode *n, std::set< unsigned char > &channels)
Definition: TotemDAQMappingESSourceXML.cc:845
TotemDAQMappingESSourceXML::verbosity
unsigned int verbosity
Definition: TotemDAQMappingESSourceXML.cc:86
TotemDAQMappingESSourceXML::nSampicChannel
Definition: TotemDAQMappingESSourceXML.cc:127
TotemDAQMappingESSourceXML::nTop
Definition: TotemDAQMappingESSourceXML.cc:117
edm::es::products
ESProducts< std::remove_reference_t< TArgs >... > products(TArgs &&... args)
Definition: ESProducts.h:128
TotemVFATInfo
Contains mappind data related to a VFAT.
Definition: TotemDAQMapping.h:23
TotemDAQMappingESSourceXML::CompleteFileName
string CompleteFileName(const string &fn)
adds the path prefix, if needed
Definition: TotemDAQMappingESSourceXML.cc:311
TotemDAQMappingESSourceXML::RPNode
bool RPNode(NodeType type)
Definition: TotemDAQMappingESSourceXML.cc:188
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
edm::FileInPath
Definition: FileInPath.h:64
cms::xerces::toString
std::string toString(XMLCh const *toTranscode)
Definition: XercesStrUtils.h:34
TotemDAQMappingESSourceXML::nSkip
Definition: TotemDAQMappingESSourceXML.cc:116
TotemDAQMappingESSourceXML::currentBlock
unsigned int currentBlock
index of the current block in 'configuration' array
Definition: TotemDAQMappingESSourceXML.cc:108
TotemDAQMappingESSourceXML::nDiamondPlane
Definition: TotemDAQMappingESSourceXML.cc:122
TotemDAQMappingESSourceXML::ParseTreeRP
void ParseTreeRP(ParseType, xercesc::DOMNode *, NodeType, unsigned int parentID, const std::unique_ptr< TotemDAQMapping > &, const std::unique_ptr< TotemAnalysisMask > &)
recursive method to extract RP-related information from the DOM tree
Definition: TotemDAQMappingESSourceXML.cc:372
TotemDAQMappingESSourceXML::tagTotemTimingCh
static const std::string tagTotemTimingCh
Definition: TotemDAQMappingESSourceXML.cc:77
mps_fire.end
end
Definition: mps_fire.py:242
TotemDAQMappingESSourceXML::tagRPPot
static const std::string tagRPPot
Definition: TotemDAQMappingESSourceXML.cc:63
ctppsRawToDigi_cff.maskFileNames
maskFileNames
Definition: ctppsRawToDigi_cff.py:16
TotemDAQMappingESSourceXML::tagDiamondPlane
static const std::string tagDiamondPlane
diamond specific tags
Definition: TotemDAQMappingESSourceXML.cc:71
TotemDAQMappingESSourceXML::pMapping
Definition: TotemDAQMappingESSourceXML.cc:133
TotemDAQMapping::TotemTimingPlaneChannelPair
Hw Id mapping for Totem Timing (dynamical mapping in Sampic)
Definition: TotemDAQMapping.h:44
TotemDAQMappingESSourceXML::tagChip1
static const std::string tagChip1
COMMON Chip XML tags.
Definition: TotemDAQMappingESSourceXML.cc:67
b
double b
Definition: hdecay.h:118
TotemDAQMappingESSourceXML::tagSampicBoard
static const std::string tagSampicBoard
totem timing specific tags
Definition: TotemDAQMappingESSourceXML.cc:75
edm::IOVSyncValue
Definition: IOVSyncValue.h:31
edm::EventID::run
RunNumber_t run() const
Definition: EventID.h:38
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TotemTimingDetId
Detector ID class for CTPPS Totem Timing detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bits ...
Definition: TotemTimingDetId.h:26
TotemDAQMappingESSourceXML::nChannel
Definition: TotemDAQMappingESSourceXML.cc:125
edm::IOVSyncValue::eventID
const EventID & eventID() const
Definition: IOVSyncValue.h:40
TotemDAQMappingESSourceXML::nRPStation
Definition: TotemDAQMappingESSourceXML.cc:119
CTPPSDiamondDetId
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
Definition: CTPPSDiamondDetId.h:24
a
double a
Definition: hdecay.h:119
TotemSymbID
Symbolic ID describing an entity of a TOTEM subdetector.
Definition: TotemSymbId.h:16
TotemDAQMappingESSourceXML::currentBlockValid
bool currentBlockValid
flag whether the 'currentBlock' index is valid
Definition: TotemDAQMappingESSourceXML.cc:111
TotemSymbID::symbolicID
unsigned int symbolicID
chip ID, raw integer representation of DetId class
Definition: TotemSymbId.h:24
TotemFramePosition
Definition: TotemFramePosition.h:31
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
edm::EventID::event
EventNumber_t event() const
Definition: EventID.h:40
TotemDAQMappingESSourceXML::tagRPPlane
static const std::string tagRPPlane
Definition: TotemDAQMappingESSourceXML.cc:64
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
cms::concurrency::xercesTerminate
void xercesTerminate()
Definition: Xerces.cc:23
TotemDAQMappingESSourceXML::pMask
Definition: TotemDAQMappingESSourceXML.cc:133
TotemDAQMappingESSourceXML::nChip
Definition: TotemDAQMappingESSourceXML.cc:123
edm::contains
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
TotemDAQMappingESSourceXML::tagTotemTimingPlane
static const std::string tagTotemTimingPlane
Definition: TotemDAQMappingESSourceXML.cc:78
TotemDAQMappingESSourceXML::nUnknown
Definition: TotemDAQMappingESSourceXML.cc:115
TotemDAQMappingESSourceXML::ParseXML
void ParseXML(ParseType, const string &file, const std::unique_ptr< TotemDAQMapping > &, const std::unique_ptr< TotemAnalysisMask > &)
parses XML file
Definition: TotemDAQMappingESSourceXML.cc:345
TotemDAQMappingESSourceXML::mappingFileNames
std::vector< std::string > mappingFileNames
the mapping files
Definition: TotemDAQMappingESSourceXML.cc:92
cond::ValidityInterval
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:17
eostools.move
def move(src, dest)
Definition: eostools.py:511
TotemVFATInfo::hwID
unsigned int hwID
the hardware ID (16 bit)
Definition: TotemDAQMapping.h:35
TotemDAQMappingESSourceXML::nTotemTimingPlane
Definition: TotemDAQMappingESSourceXML.cc:128
TotemDAQMappingESSourceXML::nDiamondCh
Definition: TotemDAQMappingESSourceXML.cc:124
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
TotemDAQMappingESSourceXML::nRPPlane
Definition: TotemDAQMappingESSourceXML.cc:121
TotemDAQMappingESSourceXML::tagRPStation
static const std::string tagRPStation
RP XML tags.
Definition: TotemDAQMappingESSourceXML.cc:62
Exception
Definition: hltDiff.cc:245
ewkTauDQM_cfi.channels
channels
Definition: ewkTauDQM_cfi.py:14
TotemDAQMappingESSourceXML::ChipFramePosition
TotemFramePosition ChipFramePosition(xercesc::DOMNode *chipnode)
extracts VFAT's DAQ channel from XML attributes
Definition: TotemDAQMappingESSourceXML.cc:777
TotemDAQMappingESSourceXML::nTotemTimingCh
Definition: TotemDAQMappingESSourceXML.cc:129
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
personalPlayback.fn
fn
Definition: personalPlayback.py:515
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TotemDAQMappingESSourceXML::DiamondNode
bool DiamondNode(NodeType type)
Definition: TotemDAQMappingESSourceXML.cc:192
TotemDAQMappingESSourceXML::nSampicBoard
Definition: TotemDAQMappingESSourceXML.cc:126
TotemDAQMappingESSourceXML::tagArm
static const std::string tagArm
Common position tags.
Definition: TotemDAQMappingESSourceXML.cc:59
TotemDAQMappingESSourceXML::TotemTimingNode
bool TotemTimingNode(NodeType type)
Definition: TotemDAQMappingESSourceXML.cc:197
TotemVFATInfo::symbolicID
TotemSymbID symbolicID
the symbolic id
Definition: TotemDAQMapping.h:32
TotemDAQMappingESSourceXML::Test
bool Test(xercesc::DOMNode *node, const std::string &name)
returns true iff the node is of the given name
Definition: TotemDAQMappingESSourceXML.cc:170
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::EventID
Definition: EventID.h:31
edm::EventRange
Definition: EventRange.h:31
child
Definition: simpleInheritance.h:11
crabWrapper.key
key
Definition: crabWrapper.py:19
cms::concurrency::xercesInitialize
void xercesInitialize()
Definition: Xerces.cc:18
TotemDAQMappingESSourceXML::nRPPot
Definition: TotemDAQMappingESSourceXML.cc:120
taus_updatedMVAIds_cff.mapping
mapping
Definition: taus_updatedMVAIds_cff.py:29
class-composition.parent
parent
Definition: class-composition.py:88
TotemRPDetId
Detector ID class for TOTEM Si strip detectors.
Definition: TotemRPDetId.h:29
TotemVFATAnalysisMask
Contains data on masked channels of a VFAT.
Definition: TotemAnalysisMask.h:22
TotemDAQMappingESSourceXML::nArm
Definition: TotemDAQMappingESSourceXML.cc:118
TotemVFATAnalysisMask::maskedChannels
std::set< unsigned char > maskedChannels
list of channels to be masked
Definition: TotemAnalysisMask.h:36