|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include <boost/date_time/posix_time/posix_time.hpp>
19 #include "CoralBase/Blob.h"
21 #include "Identifier/Identifier.h"
34 return StatusCode::SUCCESS;
42 std::chrono::duration<double> retrieving{};
45 if (!
retrieve(ctx, retrieving).isSuccess())
return StatusCode::FAILURE;
48 ATH_MSG_INFO(
"Retrieving time = " << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving).
count() * 1.0) <<
"s ");
51 return StatusCode::SUCCESS;
67 return StatusCode::FAILURE;
71 if (!readHandle.range(
range)) {
72 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle.key());
73 return StatusCode::FAILURE;
80 std::vector<Identifier> channelIds = readCdo->getChannelIds();
81 ATH_MSG_INFO(
"Found data for " << channelIds.size() <<
" channels!");
82 ATH_MSG_INFO(
"Going to display passivation params for all channels (left, right, top, bottom)");
85 fout.open(
"passivationDump.txt");
86 fout <<
"athenaId,PCB,stationName,stationEta,stationPhi,multiLayer,gasGap,left,right,top,bottom\n";
89 for(
unsigned int i=0;
i<channelIds.size(); ++
i){
94 int pcb = (chnl-1)/1024+1;
95 if(std::abs(
eta)>1) pcb+=5;
103 timer += end1 - start1;
105 return StatusCode::SUCCESS;
109 const boost::posix_time::ptime
now = boost::posix_time::microsec_clock::local_time();
110 const boost::posix_time::time_duration td =
now.time_of_day();
111 const long hours = td.hours();
112 const long minutes = td.minutes();
113 const long seconds = td.seconds();
114 const long milliseconds = td.total_milliseconds() - ((
hours * 3600 + minutes * 60 +
seconds) * 1000);
116 sprintf(buf,
"%02ld:%02ld:%02ld.%03ld",
hours, minutes,
seconds, milliseconds);
virtual StatusCode execute(const EventContext &) const override
NswPassivationTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Scalar eta() const
pseudorapidity method
StatusCode retrieve(const EventContext &, std::chrono::duration< double > &) const
static EventIDRange infiniteMixed()
Produces an mixed EventIDRange that is infinite in Time and RunLumi.
def timer(name, disabled=False)
An algorithm that can be simultaneously executed in multiple threads.
Helper struct to save the four passivation values of each PCB.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual ~NswPassivationTestAlg() override
virtual StatusCode initialize() override
StatusCode initialize(bool used=true)
std::string timestamp() const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
SG::ReadCondHandleKey< NswPassivationDbData > m_readKey