CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
evf::GlobalEvFOutputJSONDef Class Reference

Public Member Functions

 GlobalEvFOutputJSONDef ()
 

Public Attributes

jsoncollector::DataPointDefinition outJsonDef_
 
std::string outJsonDefName_
 

Detailed Description

Definition at line 87 of file GlobalEvFOutputModule.cc.

Constructor & Destructor Documentation

◆ GlobalEvFOutputJSONDef()

evf::GlobalEvFOutputJSONDef::GlobalEvFOutputJSONDef ( )

Definition at line 155 of file GlobalEvFOutputModule.cc.

155  {
156  std::string baseRunDir = edm::Service<evf::EvFDaqDirector>()->baseRunDir();
157  LogDebug("GlobalEvFOutputModule") << "writing .dat files to -: " << baseRunDir;
158 
159  edm::Service<evf::EvFDaqDirector>()->createRunOpendirMaybe();
160 
170  outJsonDef_.addLegendItem("TransferDestination", "string", jsoncollector::DataPointDefinition::SAME);
173 
174  std::stringstream tmpss, ss;
175  tmpss << baseRunDir << "/open/"
176  << "output_" << getpid() << ".jsd";
177  ss << baseRunDir << "/"
178  << "output_" << getpid() << ".jsd";
179  std::string outTmpJsonDefName = tmpss.str();
180  outJsonDefName_ = ss.str();
181 
182  edm::Service<evf::EvFDaqDirector>()->lockInitLock();
183  struct stat fstat;
184  if (stat(outJsonDefName_.c_str(), &fstat) != 0) { //file does not exist
185  LogDebug("GlobalEvFOutputModule") << "writing output definition file -: " << outJsonDefName_;
189  std::filesystem::rename(outTmpJsonDefName, outJsonDefName_);
190  }
191  edm::Service<evf::EvFDaqDirector>()->unlockInitLock();
192  }

References jsoncollector::DataPointDefinition::addLegendItem(), jsoncollector::DataPointDefinition::ADLER32, jsoncollector::DataPointDefinition::BINARYOR, jsoncollector::DataPointDefinition::CAT, Skims_PA_cff::content, LogDebug, jsoncollector::DataPointDefinition::MERGE, outJsonDef_, outJsonDefName_, jsoncollector::DataPointDefinition::SAME, jsoncollector::JSONSerializer::serialize(), jsoncollector::DataPointDefinition::setDefaultGroup(), contentValuesCheck::ss, edm_modernize_messagelogger::stat, AlCaHLTBitMon_QueryRunRegistry::string, jsoncollector::DataPointDefinition::SUM, and jsoncollector::FileIO::writeStringToFile().

Member Data Documentation

◆ outJsonDef_

jsoncollector::DataPointDefinition evf::GlobalEvFOutputJSONDef::outJsonDef_

Definition at line 91 of file GlobalEvFOutputModule.cc.

Referenced by GlobalEvFOutputJSONDef().

◆ outJsonDefName_

std::string evf::GlobalEvFOutputJSONDef::outJsonDefName_

Definition at line 92 of file GlobalEvFOutputModule.cc.

Referenced by GlobalEvFOutputJSONDef().

evf::GlobalEvFOutputJSONDef::outJsonDef_
jsoncollector::DataPointDefinition outJsonDef_
Definition: GlobalEvFOutputModule.cc:91
jsoncollector::DataPointDefinition::addLegendItem
void addLegendItem(std::string const &name, std::string const &type, std::string const &operation)
Definition: DataPointDefinition.cc:93
jsoncollector::DataPointDefinition::setDefaultGroup
void setDefaultGroup(std::string const &group)
Definition: DataPointDefinition.h:54
evf::GlobalEvFOutputJSONDef::outJsonDefName_
std::string outJsonDefName_
Definition: GlobalEvFOutputModule.cc:92
jsoncollector::DataPointDefinition::MERGE
static const std::string MERGE
Definition: DataPointDefinition.h:70
jsoncollector::DataPointDefinition::SUM
static const std::string SUM
Definition: DataPointDefinition.h:65
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
jsoncollector::DataPointDefinition::CAT
static const std::string CAT
Definition: DataPointDefinition.h:69
jsoncollector::DataPointDefinition::BINARYOR
static const std::string BINARYOR
Definition: DataPointDefinition.h:71
Skims_PA_cff.content
content
Definition: Skims_PA_cff.py:19
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::Service
Definition: Service.h:30
jsoncollector::DataPointDefinition::SAME
static const std::string SAME
Definition: DataPointDefinition.h:67
jsoncollector::FileIO::writeStringToFile
static void writeStringToFile(std::string const &filename, std::string &content)
Definition: FileIO.cc:21
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
jsoncollector::DataPointDefinition::ADLER32
static const std::string ADLER32
Definition: DataPointDefinition.h:72
jsoncollector::JSONSerializer::serialize
static bool serialize(JsonSerializable *pObj, std::string &output)
Definition: JSONSerializer.cc:14
edm_modernize_messagelogger.stat
stat
Definition: edm_modernize_messagelogger.py:27