14 #include <sys/types.h>
33 msg(MSG::INFO) <<
"initialize()" <<
endmsg;
38 if (
sc.isFailure() || !sctManager) {
39 msg(MSG::WARNING) <<
"Could not find the SCT_DetectorManager" <<
endmsg;
45 sc=
detStore()->retrieve(pixelManager,
"Pixel");
46 if (
sc.isFailure() || !pixelManager) {
47 msg(MSG::WARNING) <<
"Could not find the PixelDetectorManager" <<
endmsg;
54 if (
sc.isFailure() || !trtManager) {
55 msg(MSG::WARNING) <<
"Could not find the TRT_DetectorManager" <<
endmsg;
64 return StatusCode::SUCCESS;
77 return StatusCode::SUCCESS;
83 return StatusCode::SUCCESS;
90 IChronoStatSvc* chrono = chronoSvc();
95 std::string chronoTag =
manager->getName() +
name();
97 chrono->chronoStart( chronoTag );
101 chrono->chronoStop(chronoTag);
102 float memUsed =
getMem() - memStart;
103 float uTime = chrono->chronoDelta(chronoTag, IChronoStatSvc::USER)/1000.;
114 std::ostringstream is;
116 std::string spid=is.str();
117 std::string temp=
"cat /proc/"+spid+
"/status | grep VmSize > mem.txt";
118 system(temp.c_str());
119 std::ifstream in(
"mem.txt");
120 std::string
text,mem,text1;
121 in>>
text>>mem>>text1;
122 system(
"rm -f mem.txt");
123 float memsize=
atof(mem.c_str());