]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
do not update GRP-like entries while allows the normal behaviour when copying cdb...
authorrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 May 2009 13:52:57 +0000 (13:52 +0000)
committerrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 May 2009 13:52:57 +0000 (13:52 +0000)
STEER/AliCDBGrid.cxx

index 49b8526cdc3e83d2017d10d67099ede7264e0769..e5c9616c83a432bb9657272b733a45c6730210f5 100644 (file)
@@ -322,9 +322,13 @@ Bool_t AliCDBGrid::PrepareId(AliCDBId& id) {
        }
        delete res;
 
-       if (!id.HasVersion()){
-               id.SetVersion(lastVersion + 1);
+       // in case of GRP-like objects, do not put them if it would update a per-run entry already in place
+       if ( id.GetVersion()==1 && (id.GetLastRun()-id.GetFirstRun()==0) && lastVersion!=0 && (lastRunRange.GetLastRun()-lastRunRange.GetFirstRun()==0)){
+               AliWarning(Form("Not overwriting entry with %s", id.ToString().Data()));
+               return kFALSE;
        }
+
+       id.SetVersion(lastVersion + 1);
        id.SetSubVersion(0);
 
        TString lastStorage = id.GetLastStorage();