|
|
Go to the documentation of this file.
34 #include "tbb/concurrent_vector.h"
93 if (iTrans ==
"IsStop") {
96 if (iTrans ==
"IsFile") {
99 if (iTrans ==
"IsRun") {
102 if (iTrans ==
"IsLumi") {
105 if (iTrans ==
"IsEvent") {
114 std::vector<std::tuple<Phase, edm::EventID, int>> expectedValues(
115 std::vector<std::pair<Transition, edm::EventID>>
const& iTrans,
int iNStreams) {
116 std::vector<std::tuple<Phase, edm::EventID, int>> returnValue;
117 returnValue.reserve(iTrans.size());
122 for (
auto const& tran : iTrans) {
123 switch (tran.first) {
129 if (
lastRun.run() != maxIDValue) {
131 for (
int i = 0;
i < iNStreams; ++
i) {
138 for (
int i = 0;
i < iNStreams; ++
i) {
146 if (tran.second != lastLumi) {
147 if (lastLumi.
run() != maxIDValue) {
149 for (
int i = 0;
i < iNStreams; ++
i) {
156 for (
int i = 0;
i < iNStreams; ++
i) {
159 lastLumi = tran.second;
172 if (lastLumi.
run() != maxIDValue) {
174 for (
int i = 0;
i < iNStreams; ++
i) {
179 if (
lastRun.run() != maxIDValue) {
181 for (
int i = 0;
i < iNStreams; ++
i) {
194 p.getUntrackedParameter<
EventID>(
"id"));
232 desc.
setComment(
"Checks that the transitions specified occur during the job.");
238 descriptions.
add(
"CheckTransitions", desc);
246 std::vector<std::tuple<Phase, edm::EventID, int>> orderedSeen;
250 auto s = std::get<2>(
i);
251 if (std::get<1>(
i).
event() > 0) {
254 orderedSeen.emplace_back(std::get<0>(
i), std::get<1>(
i),
s);
256 std::sort(orderedSeen.begin(), orderedSeen.end());
258 auto orderedExpected = expectedV;
259 std::sort(orderedExpected.begin(), orderedExpected.end());
264 auto itOS = orderedSeen.begin();
265 for (
auto itOE = orderedExpected.begin(); itOE != orderedExpected.end(); ++itOE) {
266 if (itOS == orderedSeen.end()) {
269 if (*itOE != *itOS) {
270 auto syncOE = std::get<1>(*itOE);
271 auto syncOS = std::get<1>(*itOS);
272 std::cout <<
"Different ordering " << syncOE <<
" " << std::get<2>(*itOE) <<
"\n"
273 <<
" " << syncOS <<
" " << std::get<2>(*itOS) <<
"\n";
279 if (orderedSeen.size() != orderedExpected.size()) {
280 std::cout <<
"Wrong number of transition " << orderedSeen.size() <<
" " << orderedExpected.size() << std::endl;
LuminosityBlockID const & luminosityBlockID() const
void preGlobalEndLumi(GlobalContext const &)
void preStreamBeginLumi(StreamContext const &)
void preGlobalBeginLumi(GlobalContext const &)
static RunNumber_t maxRunNumber()
ParameterDescriptionBase * addVPSetUntracked(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
#define DEFINE_FWK_SERVICE(type)
void preGlobalBeginRun(GlobalContext const &)
void preallocate(service::SystemBounds const &)
T getUntrackedParameter(std::string const &, T const &) const
void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const &iSlot)
void preCloseFile(std::string const &lfn, bool primary)
void preGlobalEndRun(GlobalContext const &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void watchPreCloseFile(PreCloseFile::slot_type const &iSlot)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const &iSlot)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void preBeginJob(PathsAndConsumesOfModulesBase const &, ProcessContext const &)
void watchPreEvent(PreEvent::slot_type const &iSlot)
void preStreamBeginRun(StreamContext const &)
void watchPreGlobalEndRun(PreGlobalEndRun::slot_type const &iSlot)
void preOpenFile(std::string const &, bool)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void setComment(std::string const &value)
StreamID const & streamID() const
void watchPreStreamEndLumi(PreStreamEndLumi::slot_type const &iSlot)
unsigned int maxNumberOfStreams() const
void preStreamEndLumi(StreamContext const &)
CheckTransitions(const ParameterSet &, ActivityRegistry &)
void preStreamEndRun(StreamContext const &)
tbb::concurrent_vector< std::tuple< Phase, edm::EventID, int > > m_seenTransitions
void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const &iSlot)
void watchPreallocate(Preallocate::slot_type const &iSlot)
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
void watchPreOpenFile(PreOpenFile::slot_type const &iSlot)
void watchPreStreamEndRun(PreStreamEndRun::slot_type const &iSlot)
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of "!*" before the partial wildcard feature was incorporated). The per-event "cost" of each negative criterion with multiple relevant triggers is about the same as ! *was in the past
~CheckTransitions() noexcept(false)
std::vector< std::pair< Transition, edm::EventID > > m_expectedTransitions
EventID const & eventID() const
void preEvent(StreamContext const &)