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
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
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={})
 
- 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 51 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 113 of file TotemDAQMappingESSourceXML.cc.

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

◆ ParseType

whether to parse a mapping of a mask XML

Enumerator
pMapping 
pMask 

Definition at line 132 of file TotemDAQMappingESSourceXML.cc.

132 { pMapping, pMask };

Constructor & Destructor Documentation

◆ TotemDAQMappingESSourceXML()

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

Definition at line 244 of file TotemDAQMappingESSourceXML.cc.

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

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

◆ ~TotemDAQMappingESSourceXML()

TotemDAQMappingESSourceXML::~TotemDAQMappingESSourceXML ( )
override

Definition at line 306 of file TotemDAQMappingESSourceXML.cc.

306 {}

Member Function Documentation

◆ ChipFramePosition()

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

extracts VFAT's DAQ channel from XML attributes

Definition at line 781 of file TotemDAQMappingESSourceXML.cc.

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

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 201 of file TotemDAQMappingESSourceXML.cc.

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

◆ CompleteFileName()

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

adds the path prefix, if needed

Definition at line 310 of file TotemDAQMappingESSourceXML.cc.

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

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

Referenced by produce().

◆ DiamondNode()

bool TotemDAQMappingESSourceXML::DiamondNode ( NodeType  type)
inlineprivate

Definition at line 191 of file TotemDAQMappingESSourceXML.cc.

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

Referenced by ParseTreeDiamond().

◆ GetChannels()

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

Definition at line 849 of file TotemDAQMappingESSourceXML.cc.

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

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 177 of file TotemDAQMappingESSourceXML.cc.

177 { 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 806 of file TotemDAQMappingESSourceXML.cc.

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

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 180 of file TotemDAQMappingESSourceXML.cc.

180 { 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 521 of file TotemDAQMappingESSourceXML.cc.

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

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 376 of file TotemDAQMappingESSourceXML.cc.

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

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 647 of file TotemDAQMappingESSourceXML.cc.

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

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 349 of file TotemDAQMappingESSourceXML.cc.

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

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 318 of file TotemDAQMappingESSourceXML.cc.

318  {
320 
321  auto mapping = std::make_unique<TotemDAQMapping>();
322  auto mask = std::make_unique<TotemAnalysisMask>();
323 
324  // initialize Xerces
325  try {
326  XMLPlatformUtils::Initialize();
327  } catch (const XMLException &toCatch) {
328  throw cms::Exception("TotemDAQMappingESSourceXML")
329  << "An XMLException caught with message: " << cms::xerces::toString(toCatch.getMessage()) << ".\n";
330  }
331 
332  // load mapping files
333  for (const auto &fn : configuration[currentBlock].mappingFileNames)
335 
336  // load mask files
337  for (const auto &fn : configuration[currentBlock].maskFileNames)
339 
340  // release Xerces
341  XMLPlatformUtils::Terminate();
342 
343  // commit the products
345 }

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

◆ RPNode()

bool TotemDAQMappingESSourceXML::RPNode ( NodeType  type)
inlineprivate

Definition at line 187 of file TotemDAQMappingESSourceXML.cc.

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

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 263 of file TotemDAQMappingESSourceXML.cc.

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

References begin, configuration, edm::contains(), currentBlock, currentBlockValid, end, edm::EventID::event(), edm::IOVSyncValue::eventID(), Exception, charmTagsComputerCvsB_cfi::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 169 of file TotemDAQMappingESSourceXML.cc.

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

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

Referenced by GetChannels(), and GetNodeType().

◆ TotemTimingNode()

bool TotemDAQMappingESSourceXML::TotemTimingNode ( NodeType  type)
inlineprivate

Definition at line 196 of file TotemDAQMappingESSourceXML.cc.

196  {
197  return ((type == nArm) || (type == nRPStation) || (type == nRPPot) || (type == nSampicBoard) ||
199  }

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 107 of file TotemDAQMappingESSourceXML.cc.

Referenced by produce(), and setIntervalFor().

◆ currentBlockValid

bool TotemDAQMappingESSourceXML::currentBlockValid
private

flag whether the 'currentBlock' index is valid

Definition at line 110 of file TotemDAQMappingESSourceXML.cc.

Referenced by produce(), and setIntervalFor().

◆ mappingFileNames

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

the mapping files

Definition at line 91 of file TotemDAQMappingESSourceXML.cc.

Referenced by produce().

◆ subSystemName

string TotemDAQMappingESSourceXML::subSystemName
private

label of the CTPPS sub-system

Definition at line 88 of file TotemDAQMappingESSourceXML.cc.

Referenced by TotemDAQMappingESSourceXML().

◆ tagAnalysisMask

const string TotemDAQMappingESSourceXML::tagAnalysisMask = "analysisMask"
static

Definition at line 55 of file TotemDAQMappingESSourceXML.cc.

◆ tagArm

const string TotemDAQMappingESSourceXML::tagArm = "arm"
static

Common position tags.

Definition at line 58 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagChannel

const string TotemDAQMappingESSourceXML::tagChannel = "channel"
static

Definition at line 54 of file TotemDAQMappingESSourceXML.cc.

◆ tagChip1

const string TotemDAQMappingESSourceXML::tagChip1 = "vfat"
static

COMMON Chip XML tags.

Definition at line 66 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagChip2

const string TotemDAQMappingESSourceXML::tagChip2 = "test_vfat"
static

Definition at line 67 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagDiamondCh

const string TotemDAQMappingESSourceXML::tagDiamondCh = "diamond_channel"
static

Definition at line 71 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagDiamondPlane

const string TotemDAQMappingESSourceXML::tagDiamondPlane = "rp_plane_diamond"
static

diamond specific tags

Definition at line 70 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagRPPlane

const string TotemDAQMappingESSourceXML::tagRPPlane = "rp_plane"
static

Definition at line 63 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagRPPot

const string TotemDAQMappingESSourceXML::tagRPPot = "rp_detector_set"
static

Definition at line 62 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagRPStation

const string TotemDAQMappingESSourceXML::tagRPStation = "station"
static

RP XML tags.

Definition at line 61 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagSampicBoard

const string TotemDAQMappingESSourceXML::tagSampicBoard = "rp_sampic_board"
static

totem timing specific tags

Definition at line 74 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagSampicCh

const string TotemDAQMappingESSourceXML::tagSampicCh = "rp_sampic_channel"
static

Definition at line 75 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagTotemTimingCh

const string TotemDAQMappingESSourceXML::tagTotemTimingCh = "timing_channel"
static

Definition at line 76 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagTotemTimingPlane

const string TotemDAQMappingESSourceXML::tagTotemTimingPlane = "timing_plane"
static

Definition at line 77 of file TotemDAQMappingESSourceXML.cc.

Referenced by GetNodeType().

◆ tagVFAT

const string TotemDAQMappingESSourceXML::tagVFAT = "vfat"
static

Definition at line 53 of file TotemDAQMappingESSourceXML.cc.

◆ verbosity

unsigned int TotemDAQMappingESSourceXML::verbosity
private

Definition at line 85 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:647
TotemDAQMappingESSourceXML::subSystemName
string subSystemName
label of the CTPPS sub-system
Definition: TotemDAQMappingESSourceXML.cc:88
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
TotemDAQMappingESSourceXML::tagSampicCh
static const std::string tagSampicCh
Definition: TotemDAQMappingESSourceXML.cc:75
TotemDAQMappingESSourceXML::tagDiamondCh
static const std::string tagDiamondCh
Definition: TotemDAQMappingESSourceXML.cc:71
mps_fire.i
i
Definition: mps_fire.py:355
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:521
TotemDAQMappingESSourceXML::configuration
vector< ConfigBlock > configuration
Definition: TotemDAQMappingESSourceXML.cc:104
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:113
TotemDAQMappingESSourceXML::GetNodeType
NodeType GetNodeType(xercesc::DOMNode *)
determines node type
Definition: TotemDAQMappingESSourceXML.cc:806
class-composition.children
children
Definition: class-composition.py:88
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
cms::cuda::assert
assert(be >=bs)
charmTagsComputerCvsB_cfi.idx
idx
Definition: charmTagsComputerCvsB_cfi.py:108
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:67
TotemDAQMappingESSourceXML::GetChannels
void GetChannels(xercesc::DOMNode *n, std::set< unsigned char > &channels)
Definition: TotemDAQMappingESSourceXML.cc:849
TotemDAQMappingESSourceXML::verbosity
unsigned int verbosity
Definition: TotemDAQMappingESSourceXML.cc:85
TotemDAQMappingESSourceXML::nSampicChannel
Definition: TotemDAQMappingESSourceXML.cc:126
TotemDAQMappingESSourceXML::nTop
Definition: TotemDAQMappingESSourceXML.cc:116
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
end
#define end
Definition: vmac.h:39
TotemDAQMappingESSourceXML::CompleteFileName
string CompleteFileName(const string &fn)
adds the path prefix, if needed
Definition: TotemDAQMappingESSourceXML.cc:310
TotemDAQMappingESSourceXML::RPNode
bool RPNode(NodeType type)
Definition: TotemDAQMappingESSourceXML.cc:187
edm::FileInPath
Definition: FileInPath.h:64
cms::xerces::toString
std::string toString(XMLCh const *toTranscode)
Definition: XercesStrUtils.h:34
TotemDAQMappingESSourceXML::nSkip
Definition: TotemDAQMappingESSourceXML.cc:115
TotemDAQMappingESSourceXML::currentBlock
unsigned int currentBlock
index of the current block in 'configuration' array
Definition: TotemDAQMappingESSourceXML.cc:107
TotemDAQMappingESSourceXML::nDiamondPlane
Definition: TotemDAQMappingESSourceXML.cc:121
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:376
TotemDAQMappingESSourceXML::tagTotemTimingCh
static const std::string tagTotemTimingCh
Definition: TotemDAQMappingESSourceXML.cc:76
TotemDAQMappingESSourceXML::tagRPPot
static const std::string tagRPPot
Definition: TotemDAQMappingESSourceXML.cc:62
ctppsRawToDigi_cff.maskFileNames
maskFileNames
Definition: ctppsRawToDigi_cff.py:16
TotemDAQMappingESSourceXML::tagDiamondPlane
static const std::string tagDiamondPlane
diamond specific tags
Definition: TotemDAQMappingESSourceXML.cc:70
TotemDAQMappingESSourceXML::pMapping
Definition: TotemDAQMappingESSourceXML.cc:132
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:66
b
double b
Definition: hdecay.h:118
TotemDAQMappingESSourceXML::tagSampicBoard
static const std::string tagSampicBoard
totem timing specific tags
Definition: TotemDAQMappingESSourceXML.cc:74
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:124
edm::IOVSyncValue::eventID
const EventID & eventID() const
Definition: IOVSyncValue.h:40
TotemDAQMappingESSourceXML::nRPStation
Definition: TotemDAQMappingESSourceXML.cc:118
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:110
TotemSymbID::symbolicID
unsigned int symbolicID
chip ID, raw integer representation of DetId class
Definition: TotemSymbId.h:24
TotemFramePosition
Definition: TotemFramePosition.h:31
edm::EventID::event
EventNumber_t event() const
Definition: EventID.h:40
TotemDAQMappingESSourceXML::tagRPPlane
static const std::string tagRPPlane
Definition: TotemDAQMappingESSourceXML.cc:63
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
TotemDAQMappingESSourceXML::pMask
Definition: TotemDAQMappingESSourceXML.cc:132
edm::LogVerbatim
Definition: MessageLogger.h:297
TotemDAQMappingESSourceXML::nChip
Definition: TotemDAQMappingESSourceXML.cc:122
edm::contains
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
TotemDAQMappingESSourceXML::tagTotemTimingPlane
static const std::string tagTotemTimingPlane
Definition: TotemDAQMappingESSourceXML.cc:77
TotemDAQMappingESSourceXML::nUnknown
Definition: TotemDAQMappingESSourceXML.cc:114
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
TotemDAQMappingESSourceXML::ParseXML
void ParseXML(ParseType, const string &file, const std::unique_ptr< TotemDAQMapping > &, const std::unique_ptr< TotemAnalysisMask > &)
parses XML file
Definition: TotemDAQMappingESSourceXML.cc:349
TotemDAQMappingESSourceXML::mappingFileNames
std::vector< std::string > mappingFileNames
the mapping files
Definition: TotemDAQMappingESSourceXML.cc:91
cond::ValidityInterval
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:17
type
type
Definition: HCALResponse.h:21
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:127
TotemDAQMappingESSourceXML::nDiamondCh
Definition: TotemDAQMappingESSourceXML.cc:123
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
TotemDAQMappingESSourceXML::nRPPlane
Definition: TotemDAQMappingESSourceXML.cc:120
TotemDAQMappingESSourceXML::tagRPStation
static const std::string tagRPStation
RP XML tags.
Definition: TotemDAQMappingESSourceXML.cc:61
Exception
Definition: hltDiff.cc:246
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:781
TotemDAQMappingESSourceXML::nTotemTimingCh
Definition: TotemDAQMappingESSourceXML.cc:128
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
personalPlayback.fn
fn
Definition: personalPlayback.py:515
TotemDAQMappingESSourceXML::DiamondNode
bool DiamondNode(NodeType type)
Definition: TotemDAQMappingESSourceXML.cc:191
TotemDAQMappingESSourceXML::nSampicBoard
Definition: TotemDAQMappingESSourceXML.cc:125
TotemDAQMappingESSourceXML::tagArm
static const std::string tagArm
Common position tags.
Definition: TotemDAQMappingESSourceXML.cc:58
TotemDAQMappingESSourceXML::TotemTimingNode
bool TotemTimingNode(NodeType type)
Definition: TotemDAQMappingESSourceXML.cc:196
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:169
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
TotemDAQMappingESSourceXML::nRPPot
Definition: TotemDAQMappingESSourceXML.cc:119
taus_updatedMVAIds_cff.mapping
mapping
Definition: taus_updatedMVAIds_cff.py:28
class-composition.parent
parent
Definition: class-composition.py:88
TotemRPDetId
Detector ID class for TOTEM Si strip detectors.
Definition: TotemRPDetId.h:29
begin
#define begin
Definition: vmac.h:32
TotemVFATAnalysisMask
Contains data on masked channels of a VFAT.
Definition: TotemAnalysisMask.h:22
TotemDAQMappingESSourceXML::nArm
Definition: TotemDAQMappingESSourceXML.cc:117
TotemVFATAnalysisMask::maskedChannels
std::set< unsigned char > maskedChannels
list of channels to be masked
Definition: TotemAnalysisMask.h:36