Skip to content

Commit d823a46

Browse files
authored
Ctpdev: validity of orbitreset (#14612)
* dev: validity range adjustment * clang * fixes
1 parent b319a5f commit d823a46

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Detectors/CTP/workflowScalers/src/ctp-ccdb-orbit.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,9 @@ int main(int argc, char** argv)
125125
} else {
126126
std::cout << "Storing:" << ccdbPath << " tmin:" << tmin << " tmax:" << tmax << " ts:" << tt << std::endl;
127127
std::string filename = "orbitReset.root";
128-
TClass* tcls = TClass::GetClass(typeid(vect));
129-
auto ti = tcls->GetTypeInfo();
130128
auto classname = "std::vector<int64_t>";
131129
metadata["adjustableEOV"] = "true";
132-
ret = api.storeAsTFile_impl(&(vect), *ti, ccdbPath, metadata, tmin, tmax);
130+
ret = api.storeAsTFileAny(&(vect), ccdbPath, metadata, tmin, tmax);
133131
o2::ccdb::CcdbObjectInfo oi(ccdbPath, classname, filename, metadata, tmin, tmax);
134132
adjustOverriddenEOV(api, oi);
135133
}

Detectors/CTP/workflowScalers/src/ctpCCDBManager.cxx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,14 @@ int ctpCCDBManager::saveOrbitReset(long timeStamp)
157157
o2::ccdb::CcdbApi api;
158158
std::map<std::string, std::string> metadata; // can be empty
159159
api.init(mCCDBHost.c_str()); // or http://localhost:8080 for a local installation
160-
161-
// store abitrary user object in strongly typed manner
162-
int ret = api.storeAsTFileAny(&vect, mCCDBPathOrbitReset, metadata, tmin, tmax);
160+
// int ret = api.storeAsTFileAny(&vect, mCCDBPathOrbitReset, metadata, tmin, tmax);
161+
std::cout << "Storing:" << mCCDBPathOrbitReset << " tmin:" << tmin << " tmax:" << tmax << " ts:" << timeStamp << std::endl;
162+
std::string filename = "orbitReset.root";
163+
auto classname = "std::vector<int64_t>";
164+
metadata["adjustableEOV"] = "true";
165+
int ret = api.storeAsTFileAny(&(vect), mCCDBPathOrbitReset, metadata, tmin, tmax);
166+
o2::ccdb::CcdbObjectInfo oi(mCCDBPathOrbitReset, classname, filename, metadata, tmin, tmax);
167+
adjustOverriddenEOV(api, oi);
163168
if (ret == 0) {
164169
LOG(info) << "Orbit reset saved in ccdb:" << mCCDBHost << " tmin:" << tmin << " tmax:" << tmax;
165170
} else {

0 commit comments

Comments
 (0)